xo-init

Add XO to your project

MIT 15 个版本
安装
npm install xo-init
yarn add xo-init
pnpm add xo-init
bun add xo-init
README

xo-init Build Status

Add XO to your project

Install

$ npm install xo-init

Usage

const xoInit = require('xo-init');

xoInit().then(() => {
	console.log('done');
});

API

xoInit([options])

Returns a Promise.

options

cwd

Type: string
Default: process.cwd()

Current working directory.

args

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"]
	}
}

CLI

Install XO globally $ npm install --global xo and run $ xo --init [<options>].

License

MIT © Sindre Sorhus

版本列表
0.7.0 2018-02-13
0.6.0 2017-07-23
0.5.0 2016-11-18
0.4.0 2016-10-11
0.3.6 2015-11-16
0.3.5 2015-11-14
0.3.4 2015-10-07
0.3.3 2015-09-21
0.3.2 2015-09-05
0.3.1 2015-09-04
0.3.0 2015-09-03
0.2.0 2015-08-23
0.1.2 2015-08-10
0.1.1 2015-08-01
0.1.0 2015-08-01