Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 525 Bytes

section43.2.md

File metadata and controls

28 lines (19 loc) · 525 Bytes

Section 43.2: Installing gruntplugins

  • Adding dependcy

    • npm install grunt-contrib-jshint --save-dev
  • Loading the plugin

grunt.loadNpmTasks('grunt-contrib-jshint');
  • Configuring the task
grunt.initConfig({
  jshint: {
    all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js']
  }
});
  • Running the task

    • grunt jshint (1st way)
    • grunt.registerTask('default', ['jshint']); (2nd way)

The default task runs with the grunt command in the terminal without any options.