/LearnBlog

A simple project to learn TypeScript.

Primary LanguageTypeScript

Learning Blog

A simple project to learn TypeScript.

init

npm i -g express gulp tsd typescript nodemon bower
npm install
bower install
tsd install
gulp build

Usage

start node server and watch for file changes
input: ./build/server/go.js

gulp serve
# or
npm start

compile *.ts to *.js
input: ./server
output: ./build/server

gulp build
# or
gulp tsc

watch for *.ts file chages and compile to *.js
input: ./server or ./public
output: ./build/server

gulp watch:server #watch for server .ts changes
gulp watch:public #watch for ./public

build files for distribution
input: ./server
output: ./dist/server

gulp dist

cleanup

gulp clean:build   # cleanup ./build
gulp clean:dist    # cleanup ./dist
gulp clean         # cleanup both