npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rangle-gulp

v0.1.3

Published

Gulp helper functions for Rangle.io default project structure

Downloads

35

Readme

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.

karma(options)

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.

karmaWatch(options)

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

webDriverUpdate(options)

Set up a Protractor web driver update task.

protractor(options)

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

mocha(options)

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

jshint(options)

Set up a JSHint task

beautify(options)

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

nodemon()

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.)

sass(options)

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.

connectWatch(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).

cordovaIcons(params)

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
}

Logging

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

rg.setLogLevel('debug');