我正在尝试构建backbone样板项目,可以在这里找到:https://github.com/backbone-boilerplate/backbone-boilerplate
我在正确构建它时遇到了一些问题。以下是我在backbone-boilerplate维基上完成的步骤:
git clone https://github.com/backbone-boilerplate/backbone-boilerplate.git
cd backbone-boilerplate
sudo npm install -gq bower
sudo npm install -q
sudo npm install -gq grunt-cli
sudo grunt在这一点上我得到:
>> Local Npm module "grunt-cli" not found. Is it installed?
Warning: Task "requirejs" not found. Use --force to continue.
Aborted due to warnings.你有什么办法让它正确构建吗?
发布于 2013-09-29 16:56:56
指定深度似乎是可行的:
$ git clone --depth 1 https://github.com/backbone-boilerplate/backbone-boilerplate.git
$ npm install
$ grunt此外,如果这是您第一次安装grunt-cli,则可能需要重新启动终端
发布于 2013-10-02 04:18:53
您正在提升权限下运行grunt。我们在这里构建的文档:
https://github.com/backbone-boilerplate/backbone-boilerplate#build-process
..。让您在自己的用户下运行该命令。试一试吧!
发布于 2014-04-26 13:52:16
您需要确保使用bower构建依赖关系,而不仅仅是节点依赖关系。
快速入门
# Using Git, fetch only the latest commits. You won't need the full history
# for your project.
git clone --depth 1 https://github.com/backbone-boilerplate/backbone-boilerplate
# Move the repository to your own project name.
mv backbone-boilerplate my-project更新依赖项
# Install global dependencies. Depending on your user account you may need to
# gain elevated privileges using something like `sudo`.
npm install -g grunt-cli bower
# Optionally install coveralls (integration is baked in with Travis CI).
npm install -g coveralls
# Install NPM dependencies.
npm install
# Install Bower dependencies. ** THIS IS THE ONE YOU'VE MISSED **
bower install构建过程
# To run the build process, run the default Grunt task.
grunt
# Run a build and test the now optimized assets.
grunt default server:release如果你正确安装了node,这应该是个不错的选择。
https://stackoverflow.com/questions/19058747
复制相似问题