@plsx/cli
v0.10.0
Published
CLI app used to run, test, build and lint node applications
Downloads
5
Maintainers
Readme
@plsx/cli
Description
This tool comes with preconfigured build steps like: run, build, test, lint and format.
Usage
npm install @plsx/cli --save-dev
Then you need to add the following scripts into your project package.json:
{
"scripts": {
"start": "please run ./src/app.ts",
"build": "please build",
"format": "please format",
"test": "please test",
"lint": "please lint"
}
}
In order to also support the editors your root project should contain:
tsconfig.json
{
"extends": "@plsx/cli/config/tsconfig.base.json",
"include": ["src"],
"exclude": [
"node_modules",
"**/*.test.ts",
"**/*.spec.ts"
]
}
jest.config.js
module.exports = require('@plsx/cli/config/jest.config.js');
prettier.config.js
module.exports = require('@plsx/cli/config/prettier.config.js');
.eslintrc
module.exports = require('@plsx/cli/config/eslint.config.js');
Overwriting config
Config files are loaded by priority (config from working dir, config bundled in package). This means that for example if we have a prettier.config.js in the project root we can overwrite the default configs bundled in the package.
const baseConfig = require('@plsx/cli/config/prettier.config.js');
module.exports = {
...baseConfig,
tabWidth: 4,
};