rklyne / a-journey-of-discovery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ts-project-seed

TypeScript seed project. Use it to scaffold a TS project with all the tooling need to properly (opinated) set up a project.

Travis Coveralls github

Dependency Status devDependencies Status bitHound Overall Score Known Vulnerabilities Greenkeeper badge

How to use it

  1. Clone from github
  2. Remove origin to seed project
  3. 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

Features

Scripts provided:

Lint

Linting using tslint.

npm run lint

Clean

Clear the dist/ folder.

npm run clean

Build

Transpile TS code to JS in dist/ folder. Maps included.

npm run build

Continous build:

npm run build:w

Uglify

Concat and minify all JS files in dist/ folder to one output (default dist/all.min.js).

npm run uglify

Unit Test

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

Coverage Test

TDD mode to run it concurrently with your editions:

npm run test:tdd

CI mode to run it only one:

npm run test

Code Structure

  • /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.

Tools used

  • 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.
  • tslint TS linter.
  • typescript, of course.

This project seed will be updated to keep the dependences up to date.

License

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.

Credits

Contact: Pedro J. Molina | github: pjmolina | twitter: pmolinam

(c) 2017-2020. Metadev S.L. https://metadev.pro twitter: metad3v

About

License:Creative Commons Zero v1.0 Universal


Languages

Language:TypeScript 99.1%Language:JavaScript 0.9%