TypeScript seed project. Use it to scaffold a TS project with all the tooling need to properly (opinated) set up a project.
- Clone from github
- Remove origin to seed project
- Change the license, metadata, etc. and start building.
git clone https://github.com/metadevpro/ts-project-seed <yourProjectName>
cd <yourProjectName>
git remote remove origin
npm (or yarn) install
Scripts provided:
Linting using tslint.
npm run lint
Clear the dist/
folder.
npm run clean
Transpile TS code to JS in dist/
folder. Maps included.
npm run build
Continous build:
npm run build:w
Concat and minify all JS files in dist/
folder to one output (default dist/all.min.js
).
npm run uglify
Tests framework used are: mocha & chai.
TDD mode to run it concurrently with your editions:
npm run test:tdd
CI mode to run it only one:
npm test
Testing with coverage:
nyc npm test
nyc report -r text lcov html
coverage/index.html
TDD mode to run it concurrently with your editions:
npm run test:tdd
CI mode to run it only one:
npm run test
/src
Place your TS code under this folder. Test also following the naming convention*.spec.ts
next to file to be unit tested./dist
Output folder for transpiled project output./coverage
Output folder for coverage reports.
ts-node
Node tool to compile TS code on the fly.mocha
Testing framework.chai
Assertion framework.rimraf
Safe cross-platform rmdir for clean step.eslint
JS/TS linter.prettier
for clean and consistent style-code.typescript
, of course.
This project seed will be updated to keep the dependences up to date.
This project seed is licensed as Public Domain. Therefore, do whatever you want including changing the license for your needs in your project. More specifically, it was licensed as CC0 (Creative Commons 0) to further improve the freedom of a Public Domain Licence in context where it is not applicable.
Contact: Pedro J. Molina | github: pjmolina | twitter: pmolinam
(c) 2017-2023. Metadev S.L. https://metadev.pro twitter: metad3v