@plsx/cli
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

@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,
};

Package Sidebar

Install

npm i @plsx/cli

Weekly Downloads

2

Version

0.10.0

License

MIT

Unpacked Size

181 kB

Total Files

89

Last publish

Collaborators

  • ionutmilica