Gulp helper functions for Rangle.io default project structure
Last updated 6 years ago by e-schultz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rangle-gulp 
SYNC missed versions from official npm registry.

This is an NPM package that adds a few helper functions to make it even easier to setup common Gulp tasks.

Your Gulpfile.js would look something like this:

var gulp = require('gulp');
var rg = require('rangle-gulp');

// Set up a karma task with default paths.
gulp.task('karma', rg.karma());

// Set up a jshint task for folder foo.
gulp.task('lint-foo', rg.jshint({
  files: ['foo/**/*.js']

Available Functions

All functions take an optional parameter "options". For most functions "options.files" specifies which files to run. It can be omitted if you want to go with the default.

The default settings assume the project shown below.

Client side:

client/app/ - client-side code (*.js) and unit tests (*.test.js).
client/tests/karma.conf.js - karma configuration file.
client/tests/mocha.conf.js - mocha configuration for client-side unit test.

client/server/app.js - server's app file.
client/server/lib/ - additional server-side code and unit tests.
.jsbeautifyrc - JSBeautify configurations.
.jshintrc - JSHint configurations.


Set up a Karma task. Use "options.karmaConf" if you want to specify a path to the Karma config file. Use "options.vendor" to specify the location of angular.js, angular-mocks.js and sinon-chai.js.


Set up a karma task to run when file content changes.


Set up a Protractor web driver update task.


Set up a Protractor task. Use "options.protractorConf" if you want to specify a path to the Protractor config file.


Set up a Mocha task. Use this for server-side unit testing.


Set up a JSHint task


Set up a JSBeautify task. Use "options.configFile" if you want to specify a config file other than ".jsbeautifyrc".


Sets up a nodemon task. Use "options.onChange" to provide an array of task names for tasks that should run on file change. (The default is just lint.)


Sets up a sass task that watches for changes, compiles sass to css and then minifies the css. The task requires source (array of source locations) and destination location to be passed in as options.


Starts a connect server which watches for changes to html & js files. It re-loads browser (make sure you install live-reload extension for your browser). The options can set root (folder path) port, livereload (boolean) and glob (arrary of source locations).


Depends on graphicsmagick. brew install graphicsmagick

Generates resized and renamed icons for iOS and/or android, and places them in the proper platforms directory.

Params is an object, and will set these default values:

  "iconSrc"   : "icon.png",
  "platforms" : ["android", "ios"],
  "project"   : "undefined" // You ALWAYS have to specify this for iOS


You can turn on control logging using setLogLevel(). E.g.:


Current Tags

  • 0.1.3                                ...           latest (6 years ago)

11 Versions

  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (2)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 11
Dependencies (39)
Dev Dependencies (0)

Copyright 2014 - 2016 © taobao.org |