Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xojs/create-xo
Add XO to your project
https://github.com/xojs/create-xo
nodejs npm-init npm-package xo
Last synced: 3 months ago
JSON representation
Add XO to your project
- Host: GitHub
- URL: https://github.com/xojs/create-xo
- Owner: xojs
- License: mit
- Created: 2015-08-01T16:46:22.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-11-04T10:41:06.000Z (almost 1 year ago)
- Last Synced: 2024-07-19T10:48:42.484Z (4 months ago)
- Topics: nodejs, npm-init, npm-package, xo
- Language: JavaScript
- Homepage: https://github.com/xojs/xo
- Size: 43.9 KB
- Stars: 47
- Watchers: 8
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# create-xo
> Add [XO](https://github.com/xojs/xo) to your project
## CLI
```sh
npm init xo [options]
```Example:
```sh
npm init xo --space --no-semicolon
```## API
### Usage
```js
import createXo from 'create-xo';await createXo();
```### createXo(options?)
Returns a `Promise`.
#### options
Type: `object`
#### cwd
Type: `string`\
Default: `process.cwd()`The current working directory.
#### args
Type: `string[]`\
Default: CLI arguments *(`process.argv.slice(2)`)*The options to put in [XO's config](https://www.npmjs.com/package/xo#config) in `package.json`.
For instance, with the arguments `['--space', '--env=node']`, the following will be put in `package.json`:
```json
{
"name": "awesome-package",
"xo": {
"space": true,
"envs": [
"node"
]
}
}
```