gear-lib v0.9.2
gear-lib
Collection of common Gear.js tasks
Useful tasks to lint, minify, and deploy assets.
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
Lint Javascript files.
Arguments
- options.config - Options for JSLint.
Example
.jslint({config: {nomen: true}})
Lint Javascript files.
Arguments
- options.config - Options for JSHint.
Example
.jshint({config: {browser: true, eqeqeq: true}})
.jshint({configFile: '.jshintrc'})
Minify Javascript files.
Arguments
- options.config - Options for uglify-js.
Example
.jsminify()
Lint CSS files.
Arguments
- options.config - Options for CSSLint.
Example
.csslint({config: {'duplicate-properties': true}})
Minify CSS files.
Aliased as less()
Example
.cssminify()
// Compile LESS stylesheets without minifying
.less({compress: false})
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"
})
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'
}})
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'
})
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago