首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在非全局安装中使用Grunt

在非全局安装中使用Grunt
EN

Stack Overflow用户
提问于 2013-04-21 20:27:12
回答 1查看 480关注 0票数 3

在不安装全局依赖项的情况下尝试构建自定义版本的jQuery时,我遇到了以下问题:

代码语言:javascript
复制
$ 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,那么我在这里遗漏了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-25 03:11:13

这是因为jQuery自定义任务是如何产生的。我刚刚发送了一个拉取请求,可以解决这个问题:https://github.com/jquery/jquery/pull/1255

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16131084

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档