Add XO to your project
$ npm install --save xo-init
var xoInit = require('xo-init');
xoInit().then(function () {
console.log('done');
});
Returns a promise.
Type: string
Default: '.'
Current working directory.
Type: array
Default: CLI arguments (process.argv.slice(2)
)
Options to put in XO's config in package.json
.
For instance, with the arguments ['--space', '--env=node']
the following will be put in package.json
:
{
"name": "awesome-package",
"xo": {
"space": true,
"envs": ["node"]
}
}
Install XO globally $ npm install --global xo
and run $ xo --init [<options>]
.
MIT © Sindre Sorhus