— Jan 27, 2015
Update - The jasmine-npm module and its README is an even more to the point example of this setup. Check it out https://github.com/jasmine/jasmine-npm.
To use Grunt on the command line, I also need to install the grunt-cli library.
If you use Homebrew, the Node.js install is straight forward:
$ brew install node
Once node is installed, I use
npm (“node package manager”) to install
the root directory of your project. Here are the dependencies for our simple
$ npm install
This file configures the Grunt task runner. Here is a simple configuration:
./lib directory and finds spec
*Spec.js in the
I skipped over adding specs in this post. Checkout my example repo for a simple, complete example. You can run the test suite with this command:
$ grunt jasmine
You should see output like:
Running "jasmine:tappy" (jasmine) task Testing jasmine specs via PhantomJS Thing ✓ does stuff 1 spec in 0.004s. >> 0 failures Done, without errors.
Let me know if you have any questions in the comments! I may not know the answer, but I love opportunities to learn!comments powered by Disqus