Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Collection of common Gear.js tasks

branch: master

This branch is 0 commits ahead and 0 commits behind master

bumped pkg version #6

latest commit 0c9b51a195
Stephen Murphy authored April 13, 2014
Octocat-spinner-32 build Add jshint task April 12, 2014
Octocat-spinner-32 lib Add jshint task April 12, 2014
Octocat-spinner-32 test Add jshint task April 12, 2014
Octocat-spinner-32 vendor completed migration to require.js June 15, 2012
Octocat-spinner-32 .gitignore added istanbul code coverage and bumped deps March 11, 2013
Octocat-spinner-32 .travis.yml removed 0.6 travis build September 18, 2013
Octocat-spinner-32 Gearfile Add jshint task April 12, 2014
Octocat-spinner-32 LICENSE added yahoo copyrights May 29, 2012
Octocat-spinner-32 Makefile using Gearfile for build August 02, 2013
Octocat-spinner-32 README.md Add jshint task April 12, 2014
Octocat-spinner-32 index.js added istanbul code coverage and bumped deps March 11, 2013
Octocat-spinner-32 package.json bumped pkg version #6 April 13, 2014
README.md

gear-lib

Collection of common Gear.js tasks

Useful tasks to lint, minify, and deploy assets.

Build Status

NPM

Installation

$ npm install gear-lib

Quick Examples

Deploy to S3

new Queue({registry: 'gear-lib'})
    .read(['foo.js', 'bar.js', 'baz.js'])
    .concat()
    .jslint({config: {nomen: true}})
    .jsminify()
    .s3({name: 'foobarbaz.js', client: {
        key: '<key>',
        secret: '<secret>',
        bucket: 'gearjs'
    }})
    .run();

Documentation

Tasks

Tasks

jslint()

Lint Javascript files.

Arguments

  • options.config - Options for JSLint.

Example

.jslint({config: {nomen: true}})

jshint()

Lint Javascript files.

Arguments

  • options.config - Options for JSHint.

Example

.jshint({config: {browser: true, eqeqeq: true}})
.jshint({configFile: '.jshintrc'})

jsminify()

Minify Javascript files.

Arguments

  • options.config - Options for uglify-js.

Example

.jsminify()

csslint()

Lint CSS files.

Arguments

  • options.config - Options for CSSLint.

Example

.csslint({config: {'duplicate-properties': true}})

cssminify()

Minify CSS files.

Aliased as less()

Example

.cssminify()

// Compile LESS stylesheets without minifying
.less({compress: false})

glob()

Read files using wildcards. See Glob package

Arguments

  • options.pattern - Glob pattern.
  • options.options - Glob options.

Example

.glob({
    pattern: "*.js"
})

s3()

Deploy file to S3.

Arguments

  • options.name - Filename to write to S3.
  • options.client.key - S3 key.
  • options.client.secret - S3 secret.
  • options.client.bucket - S3 bucket.

Example

 .s3({name: 'foobarbaz.js', client: {
    key: '<key>',
    secret: '<secret>',
    bucket: 'gearjs'
 }})
Something went wrong with that request. Please try again.