0.1.0 • Published 3 years ago

@pi-base/dev v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Audit Test Release NPM

Shared developer tools for π-Base packages.

Usage

Installation

$ npm install --save-dev @pi-base/dev
$ npm set-script prepare "pi-base-dev prepare"
$ npm run prepare

Configuration

@pi-base/dev exports a number of common base configurations

// .eslintrc.js
module.exports = require('@pi-base/dev').eslintConfig

// .lintstagedrc.js
module.exports = require('@pi-base/dev').lintStagedConfig

// .prettierrc.js
module.exports = require('@pi-base/dev').prettierConfig

// .tsconfig.json
{
  "extends": "@pi-base/dev/tsconfig.shared.json",
  "include": ["src/**/*.ts"]
}

It also includes a CLI wrapping several common tasks, intended for use as npm run scripts

// package.json
{
  "scripts": {
    "fmt": "pi-base-dev fmt",
    "fmt:check": "pi-base-dev fmt:check",
    "lint": "pi-base-dev lint",
    "lint:check": "pi-base-dev lint:check",
    "test": "pi-base-dev test",
    "test:cov": "pi-base-dev test:cov",
    "test:watch": "pi-base-dev test:watch"
  }
}

or in a .husky/pre-commit hook

# .husky/pre-commit
pi-base-dev lint-staged

Development

Installation

$ npm install

Release

Releases to NPM are automatically triggered by creating a Github release named vX.X.X (matching the current version in package.json).

Be sure to add a CHANGELOG entry when updating the version.