- TypeScript 2.2
- Webpack 2
- Rollup
- tslint
- Mocha + Karma + PhantomJS
Install dependencies
npm i
Dev (webpack dev server)
npm run dev
Test (Karma + PhantomJS)
npm run test
Lint (tslint)
npm run lint
Build (Webpack or Rollup)
npm run build
npm run build:rollup
This package exports a function called stringNormalize, which can be called on a string and will standardize punctuation.
npm init -f
npm i ts-loader typescript -D
or "awesome-typescript-loader"
tsc --init
npm i chai mocha -D
types
npm i @types/chai @types/mocha -D
Create "karma.conf.js"
karma init
With Mocha
npm i karma-mocha karma-phantomjs-launcher karma-webpack -D
singleRun .. true
npm i webpack webpack-dev-server -D
npm i cross-env -D
Dev
npm run dev
Test
npm run test
Lint
npm run lint
Build
npm run build
Build With Rollup
npm i rollup rollup-plugin-typescript uglify-js -D
npm run build: rollup
Create file ".editorconfig"
Editor : Visual Studio Code
npm i tslint -D
Create "tslint.json"
tslint --init
- extension: tsLint for Visual Studio Code
Travis
Create ".travis.yml"