Example or skeleton for using Grunt.
As default Grunt runs the following tasks:
clean, csslint, jshint, jscs, jasmine, uglify, release, yuidoc, compress
Adjust package.json to your needs and edit Gruntfile.js when needed.
Installing the command line interface.
npm install -g grunt-cli
- Download or clone repository
- inside of the directory run
npm install
to install the dependencies - run
grunt
The example use grunt-githooks and have a test task defined which runs jshint, jscs.
To activate the hook run grunt githooks
, then every commit will run the test task before.
The continuous integration service is monitoring this repository: Link
Using the example as Jenkins job, simple run a shell execution when dependencies are installed.
#!/bin/bash
export PATH=/usr/local/bin:$PATH;
git clone https://github.com/DBProductions/grunt-sample.git .
npm install
grunt --verbose
For diplaying the results, following Plugins are useful.
- Checkstyle Plug-in
- Cobertura Plugin
Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo.