
We have many steps to perform
npm -g install grunt-cli npm install grunt --save-dev// package.json
{
"name": "example-project",
"version": "0.0.1",
"devDependencies": {
"grunt": "~0.4.4"
}
}
module.exports = function(grunt) {
grunt.initConfig({
simplemocha: {
options: { timeout: 3000 },
all: { src: ['test/**/*.js'] }
}
});
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.registerTask('default','simplemocha');
};
module.exports = function(grunt) { grunt.initConfig({ //specify configuration for different tasks //see documentation for expected values }); //task plugins to be loaded grunt.loadNpmTasks(‘package-name’); //indicate lists of tasks that can be run from //command line grunt.registerTask(‘default ’,'task-name' ); };
npm install grunt-contrib-jshint --save-dev
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'server.js']
}
});
grunt.registerTask('default','jshint');
}