gear-lib
Collection of common gear tasks
Last updated 12 years ago by twobit .
Repository · Bugs · Original npm · Tarball · package.json
$ npm install gear-lib 
SYNC missed versions from official npm registry.

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.limit - Limit the amount of concurrently opened files.
  • 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'
 }})

### dest()

Move one or more files to a destination.

Arguments

  • options.dir - File destination.
  • options.base - Base path for incoming files.
  • options.encoding - File encoding.

Example

.dest('path/of/destination')

// With more options
.dest({
  dir: 'path/of/destination',
  base: 'path/of'
})

Current Tags

  • 0.9.2                                ...           latest (10 years ago)

43 Versions

  • 0.9.2                                ...           10 years ago
  • 0.9.1                                ...           10 years ago
  • 0.9.0                                ...           11 years ago
  • 0.8.15                                ...           11 years ago
  • 0.8.14                                ...           11 years ago
  • 0.8.12                                ...           11 years ago
  • 0.8.11                                ...           11 years ago
  • 0.8.9                                ...           11 years ago
  • 0.8.8                                ...           12 years ago
  • 0.8.7                                ...           12 years ago
  • 0.8.6                                ...           12 years ago
  • 0.8.5                                ...           12 years ago
  • 0.8.4                                ...           12 years ago
  • 0.8.3                                ...           12 years ago
  • 0.8.2                                ...           12 years ago
  • 0.8.1                                ...           12 years ago
  • 0.8.0                                ...           12 years ago
  • 0.7.10                                ...           12 years ago
  • 0.7.9                                ...           12 years ago
  • 0.7.8                                ...           12 years ago
  • 0.7.7                                ...           12 years ago
  • 0.7.6                                ...           12 years ago
  • 0.7.5                                ...           12 years ago
  • 0.7.4                                ...           12 years ago
  • 0.7.3                                ...           12 years ago
  • 0.7.2                                ...           12 years ago
  • 0.7.1                                ...           12 years ago
  • 0.7.0                                ...           12 years ago
  • 0.6.1                                ...           12 years ago
  • 0.6.0                                ...           12 years ago
  • 0.4.2                                ...           12 years ago
  • 0.4.1                                ...           12 years ago
  • 0.4.0                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.1.4                                ...           12 years ago
  • 0.1.3                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
  • 0.0.6                                ...           12 years ago
  • 0.0.5                                ...           12 years ago
  • 0.0.4                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
Maintainers (1)
Downloads
Total 2
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE