@ionutmilica/please
v0.7.0
Published
CLI app used to run, test, build and lint node applications
Downloads
5
Maintainers
Readme
@ionutmilica/please
Description
This tool comes with preconfigured build steps like: run, build, test, lint and format.
Usage
npm install @ionutmilica/please --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": "@ionutmilica/please/config/tsconfig.base.json",
"include": ["src"],
"exclude": [
"node_modules",
"**/*.test.ts",
"**/*.spec.ts"
]
}
jest.config.js
module.exports = require('@ionutmilica/please/config/jest.config.js');
prettier.config.js
module.exports = require('@ionutmilica/please/config/prettier.config.js');
.eslintrc
module.exports = require('@ionutmilica/please/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('@ionutmilica/please/config/prettier.config.js');
module.exports = {
...baseConfig,
tabWidth: 4,
};