README
TS Scripts
Simple, mostly opinionated, scripts to build TypeScript modules.
Installation
npm install @borderless/ts-scripts --save-dev
Usage
In your package.json you can use the scripts:
{
"scripts": {
"lint": "ts-scripts lint",
"format": "ts-scripts format",
"specs": "ts-scripts specs",
"test": "ts-scripts test",
"prepare": "ts-scripts install && ts-scripts build"
}
}
Batteries Included
install- Installshuskyandlint-stagedlint- Useseslint --fixformat- Usesprettier --writespecs- Usesjestbuild- Usesrimrafandtsccheck- Useseslintandprettier --checktest- Runscheck,specs, andbuild
Configuration
Configuration can get specified in your package.json file under ts-scripts:
js- Enables.jsfiles for linting and testing (default:false)react- Enables React.js for linting and testing (default:false)src- An array of source directories to read (default:["src"])dist- An array of output directories to clean, i.e.outDirintsconfig.json(default:["dist"])projectAn array oftsconfig.jsonproject files for TypeScript (default:["tsconfig.json"])testAn array of test configuration objects (default:[{}])nameThe name of this test configuration (default:undefined)dirAn array of directories to read tests from (default:src)envThe environment to use for these tests (default:"node")projectThetsconfig.jsonproject file to use for this test (default:"tsconfig.json")
License
MIT