Easily keep anything in your project up-to-date by installing the updaters you want to use and running
update
in the command line! Update the copyright date, licence type, ensure that a project uses your latest eslint or jshint configuration, remove deprecated package.json fields, or anything you can think of!
Install globally with npm
$ npm i -g update
$ update <command> [options]
List updaters
Choose from a list of updaters and tasks to run:
$ update list
Run a specific updater
The following would run updater foo
:
$ update foo
# run updater "foo" with options
$ update foo --bar=baz
(TODO)
(TODO)
(TODO)
(TODO)
A middleware is a function that exposes the following parameters:
file
: {Object} vinyl file objectnext
: {Function} must be called to continue on to the next file.
function rename(file, next) {
file.path = 'foo/' + file.path;
next();
}
// example usage: prefix all `.js` file paths with `foo/`
app.onLoad(/\.js/, rename);
The onStream
method is a custom middleware handler that the update
app.onStream(/lib\//, rename);
Install with npm:
$ npm i update --save
var update = require('update');
Create an update
application. This is the main function exported by the update module.
Params
options
{Object}Example
var Update = require('update');
var update = new Update();
(TODO)
(TODO)
(TODO)
Updater plugins follow the same signature as gulp plugins
Example
function myPlugin(options) {
return through.obj(function(file, enc, next) {
var str = file.contents.toString();
// do stuff to `file`
file.contents = new Buffer(file.contents);
next(null, file);
});
}
updater-*
.js
)updater
to the keywords in package.json
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 09, 2016.