AnC
AnC

Reputation: 4201

using Grunt with non-global installation

While attempting to build a custom version of jQuery without installing global dependencies, I ran into the following issue:

$ 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.

I haven't worked with Grunt or Node much before, so what am I missing here?

Upvotes: 3

Views: 499

Answers (1)

Kyle Robinson Young
Kyle Robinson Young

Reputation: 13762

This is because of how the jQuery custom task spawns grunt. I've just sent a pull request which would fix this issue: https://github.com/jquery/jquery/pull/1255

Upvotes: 3

Related Questions