项目作者: tobymurray

项目描述 :
Seed Express application with TypeScript and Babel
高级语言: TypeScript
项目地址: git://github.com/tobymurray/express-typescript-babel.git
创建时间: 2017-02-19T06:30:28Z
项目社区:https://github.com/tobymurray/express-typescript-babel

开源协议:

下载


Build Status

ExpressJS, TypeScript 2 and Babel

ExpressJS is one of the go-to technologies for Node JS servers. If you’re looking for something to support an Angular client, it’s a great choice. Unfortunately the associated generator project produces vanilla JavaScript, and coming from the TypeScript world of Angular, who wants vanilla ES5-ish JavaScript?

Build

Start with yarn run build

  1. $ yarn run build
  2. yarn run v0.20.3
  3. $ yarn run clean && yarn run tsc && yarn run babel && yarn run copy-files
  4. yarn run v0.20.3
  5. $ rm -rf build && rm -rf dist
  6. Done in 0.31s.
  7. yarn run v0.20.3
  8. $ node ./node_modules/.bin/tsc
  9. Done in 1.74s.
  10. yarn run v0.20.3
  11. $ node ./node_modules/.bin/babel --presets es2015 build --out-dir dist --source-maps
  12. build/app.js -> dist/app.js
  13. build/bin/www.js -> dist/bin/www.js
  14. build/models/http_error.js -> dist/models/http_error.js
  15. build/routes/index.js -> dist/routes/index.js
  16. build/routes/users.js -> dist/routes/users.js
  17. Done in 0.80s.
  18. yarn run v0.20.3
  19. $ cp package.json dist/ && cp -r public dist/ && cp -r node_modules dist/
  20. Done in 0.28s.
  21. Done in 4.11s.

Run

Run with cd dist && yarn run start

  1. $ cd dist && yarn run start
  2. yarn run v0.20.3
  3. $ node ./bin/www