The Wayback Machine - https://web.archive.org/web/20201108031135/https://github.com/xojs/create-xo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

create-xo Build Status

Add XO to your project

CLI

$ npm init xo [options]

Example:

$ npm init xo --space --no-semicolon

API

Usage

const createXo = require('create-xo');

(async () => {
	await createXo();
})();

createXo(options?)

Returns a Promise.

options

Type: object

cwd

Type: string
Default: process.cwd()

Current working directory.

args

Type: string[]
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"
		]
	}
}
You can’t perform that action at this time.