![{%= name %} demo](https://raw.githubusercontent.com/{%= repo %}/master/demo-update.gif)
![{%= name %} demo](https://raw.githubusercontent.com/{%= repo %}/master/demo-create.gif)
{%= include('update/what-is-update') %}
Heads up!: Always make sure your work is committed before running update
.
Install Update's CLI and {%= name %}:
{%= include("updater-install") %}
You should now be able to run {%= name %}
with the following command:
$ update {%= alias %}
What will this do?
This updater's default
task will replace the .eslintrc.json
file in the current working directory with either ~/templates/_eslintrc.json
(defined by you in user home), or if a template does not exist in user home the default template will be used.
Tasks on {%= name %}
are by run using the syntax eslint:foo
, where foo
is the task name:
Example
The following will run the bar
task from updater foo
:
$ update foo:bar
^ ^
updater task
Default task
If a task is not explicitly passed Update's CLI will run the default
task.
{%= apidocs('index.js') %}
Visit Update's task documentation.
Use {%= name %}
as a plugin{plugins.md} in your own updater{updaters.md}.
{%= include("install-npm", {save: true}) %}
Inside your own updater{updaters.md}:
module.exports = function(app) {
// register {%= name %} as a plugin
app.use(require('{%= name %}'));
// run the `default` task on {%= name %}
app.task('{%= strip("updater-", name) %}', function(cb) {
app.update('{%= name %}', cb);
});
// run a specific task on {%= name %}
// (where `foo` is the name of the task to run)
app.task('{%= strip("updater-", name) %}', function(cb) {
app.update('{%= name %}:foo', cb);
});
};
Visit the updater docs{updaters.md} to learn more about creating, installing, using and publishing updaters.
Overriding templates
You can override a template by adding a template of the same name to the templates
directory in user home. For example, to override the _eslintrc.json
template, add a template at the following path ~/templates/_eslintrc.json
.