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

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 build
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gearfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
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.