JS Build Automation Tools

major js players

$npm install -g gulp

$npm install -g bower

Verify install

$ gulp -v

$ bower -v

You can also list all global packages installed with NPM

$ npm list -g –depth=0

Install packages for a specific project locally

CRITICAL MAKE SURE YOU ARE IN YOUR PROJECT FOLDER BEFORE RUNNING LOCAL COMMANDS

npm install –save-dev packageName

replace packagename

npm install gulp –save-dev   (install gulp locally)

–save-dev  = saves it to devDependencies in package,json

So my commands to update the package.json file devDependencies

$npm install –save-dev gulp

Some more tools

Use this tool to detect errors and potential problems.

Using gulp to install so you can do project wide checking via gulp task

$npm install –save-dev gulp-jscs gulp-jshint

You will need to update the gulp file also for the require statements.

var jshint = require(‘gulp-jshint’);

var jscs = require(‘gulp-jscs’);

Credit to John Papa for his plural sight course JS Build Automation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s