Search results for 2014 08 04 choose grunt gulp npm ?utm_source=ourjs.com

Building a JavaScript Library with Grunt.js

by Brian Rinaldi

{ options: { trailing: true, eqeqeq: true }, target: { src: [‘src/**/*.js’, ‘test/**/*.js’] } } }); grunt.loadNpmTasks(‘grunt-contrib-jshint’); grunt.loadNpmTasks(‘grunt-contrib-concat’); grunt.loadNpmTasks(‘grunt-contrib-uglify’); grunt.loadNpmTasks(‘grunt-contrib-copy’); grunt.loadNpmTasks(‘grunt-contrib-qunit’); grunt.registerTask(‘default’, [‘jshint’, ‘concat’, ‘uglify’, ‘copy’, ‘qunit’]); }; Conclusion Grunt.js…

A JavaScript Build System Shootout: Grunt vs. Gulp vs. NPM

by Nicolas Bevacqua

the gulp package from npm both locally and globally. touch Gulpfile.js npm install -g gulp npm install –save-dev gulp To get started, I’ll create a Gulp task to lint a…

Roll Your Own Asset Pipeline with Gulp

by Brian Rinaldi

npm install –save-dev gulp npm install –save-dev gulp-less Alright, now create your gulpfile.js: var gulp = require(‘gulp‘); var less = require(‘gulp-less’); gulp.task(‘less’, function() { return gulp.src(‘css/app.less’) .pipe(less()) .pipe(gulp.dest(‘dist’)); }); This…

Building Your First Grunt Plugin

by Brian Rinaldi

Assuming you have Node (and npm) installed, you can install grunt-init via the command line: npm install -g grunt-init The template for the plugin is located at https://github.com/gruntjs/grunt-init-gruntplugin and it…

Real-World Best Practices for Building Angular.js Apps without Browserify or Require.js

by Jeff Dickey

…(Install gulpsourcemaps) var gulp = require(‘gulp‘) var concat = require(‘gulp-concat’) var sourcemaps = require(‘gulpsourcemaps’) var uglify = require(‘gulp-uglify’) var ngAnnotate = require(‘gulp-ng-annotate’) gulp.task(‘js’, function () { gulp.src([‘src/**/module.js’, ‘src/**/*.js’]) .pipe(sourcemaps.init()) .pipe(concat(‘app.js’))…

Automating Complex Workflows with Grunt Custom Tasks

by Ben Farrell

at how to run an existing Grunt task we’ve grabbed from npm or GitHub. In a Grunt.js file, we will typically Load the task. For example: grunt.loadNpmTasks(‘grunt-contrib-copy’); Register the task:…

Writing a Command Line Utility using Node

by Brian Rinaldi

(current version is 0.10.13) NPM installed (this is typically packaged with Node) Grunt-cli installed (if not run npm install -g grunt-cli) Grunt-Init installed (if not run npm install -g grunt-init)…

Introduction to npm

by Brian Rinaldi

the command line arguments. More Info There’s actually a lot more to npm that I haven’t covered. Here are some good resources on npm: Tour of npm npm Tricks How…

Automating CSS using Grunt

by Brian Rinaldi

…learn more about Grunt and Node.js by creating and sharing a Grunt task that would execute CSSCSS. The Grunt task, which is named grunt-csscss, is published on NPM. The source

Building your first Node.js module

by Jonathan Fielding

…values for our name, email and our website URL. The full commands are: npm set init.author.name “Jonathan Fielding” npm set init.author.email “[email protected]comnpm set init.author.url “http://modernweb.com” Creating your Git repository…