Gulp

  • Task manager for web project.
  • npm install -g gulp or npm install gulp –save-dev [for devDependencies, gulp is not needed for deployment]
  • Make gulpfile.js run gulp style, gives warning according to the code.
  • To inject js and css automatically:
    • npm install wiredep –save-dev #for bower dependencies
    • npm install gulp-inject –save-dev #for our dependencies
    • Code in gulpFile.js for injecting file.
    • in HTML files put
      <!– bower: js–>
      <!– endbower –>
    • for inject put
      <!– inject: js–>
      <!– endinject –>
    • run gulp inject and HTML files would have all js files required.
    • [See memo for css/less problem in bootstrap/gulp]

//These tools are used in gulpFile.js

JS Hint:

  • For coding standards => .jshintrc
  • Configurable and open source

JSCS:

  • For coding style => .jscsrc
  • Configurable and open source
Advertisements