→ gruntjs.com
sudo npm install -g grunt-cli // grunt Command Line Interface npm install grunt --save-dev npm install grunt-contrib-jshint --save-dev // si on veut utiliser jshint via grunt
→ GruntFile.js Grunt recherche un fichier appelé GruntFile.js à la racine du projet <code> module.export = function(grunt) { Grunt attend de ce fichie l'export d'un module
// on configure Grunt ici
grunt.initConfig({
jshint: {
files: ["*.js", "lib/*.js", "test/*.js"],
options: {
esnext: true,
globals: {
jQuery: true,
},
},
},
});
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.registerTask("default", ["jshint"]);
}; </code>
grunt // commande à taper pour lancer grunt si installé globalement