How many config files does it take to build a modern Typescript app? Let's find out!
-
Install
gulp
.npm install --global gulp
-
Install dependencies.
npm install
-
Build it.
gulp
-
Run it.
node dist/index.js
or
npm start
gulp
: buildgulp watch
: watchify and build TypeScript filesgulp lint
gulp test
: build and testgulp doc
: output documentation todoc/
gulp clean
npm start
: runnpm run cover
: stores coverage information incoverage/
A launch.json
configuration for VSCode is included.
I also recommend using QuickTask with VSCode: ext install quicktask
.
@types/node
: Gives TypeScript access to node globals such asrequire
andmodule
.del
: Allowsgulpfile.js
to delete files.eslint
: JavaScript linter.gulp
: JavaScript task runnner with task dependency management.gulp-eslint
: Gulp plugin for ESLint.gulp-imagemin
: Gulp plugin to minimize images.gulp-mocha
: Gulp plugin for Mocha.gulp-tslint
: Gulp plugin for TSLint.gulp-typedoc
: Gulp plugin for TypeDoc.gulp-typescript
: Gulp plugin for Typescript.istanbul
: JavaScript code coverage instrumentation library.mocha
: JavaScript test framework.standard
: Opinionated JavaScript linting style.tslint
: TypeScript linter.typedoc
: TypeScript documentation generator.typescript
: Typed JavaScript superset language.