在不安装全局依赖项的情况下尝试构建自定义版本的jQuery时,我遇到了以下问题:
$ node --version
v0.10.4
$ npm --version
1.2.18
$ git clone git://github.com/jquery/jquery.git
$ cd jquery
$ git checkout `git describe --abbrev=0 --tags` # latest tag
$ npm install
$ npm install grunt-cli
# variant A
$ npm run-script grunt custom:-ajax # does nothing
# variant B
$ node_modules/.bin/grunt custom:-ajax
Running "custom:-ajax" (custom) task
Creating custom build...
Warning: Error: not found: grunt Use --force to continue.
Aborted due to warnings.我以前没有使用过Grunt或Node,那么我在这里遗漏了什么?
发布于 2013-04-25 03:11:13
这是因为jQuery自定义任务是如何产生的。我刚刚发送了一个拉取请求,可以解决这个问题:https://github.com/jquery/jquery/pull/1255
https://stackoverflow.com/questions/16131084
复制相似问题