A simple starting point for writing TypeScript on Node.js.
TypeScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit b9e0511 May 14, 2017
Permalink
Failed to load latest commit information.
src Initial commit May 7, 2017
.gitignore Initial commit May 7, 2017
LICENSE Initial commit May 7, 2017
README.md Initial commit May 7, 2017
package.json Initial commit May 7, 2017
tsconfig.json noImplicityAny: true May 14, 2017
tslint.json Initial commit May 7, 2017
yarn.lock Initial commit May 7, 2017

README.md

node-typescript-starter

A simple starting point for writing TypeScript on Node.js.

  • Targets Node 7.x & ES6 out of the box
  • Sane defaults that are easy to change: tsconfig.json, tslint.json & Yarn instead of npm.
  • The bare minimum in dependencies: typescript, tslint, ts-node & mocha.

This project stemmed from the lack of solid documentation for getting started writing TypeScript on Node, especially around tsconfig.json. I then found myself copying configuration from my 'last' project each time I'd start a new one, and so creating a reusable starting point made sense.

How Do I Use It?

Good question! The best way to use this template is just to clone it/fork it and start hacking:

git clone https://github.com/elithrar/node-typescript-starter.git
# Then: fill out the empty package.json fields, update the LICENSE file
yarn install # or npm install
# Start writing TypeScript!
open src/App.ts

When you've hacked away, you'll need to build your project:

yarn build
# Outputs:
# yarn build v0.22.0
# $ tsc
# ✨  Done in 2.89s.

This outputs compiled JavaScript to build/* as well as type definitions for your project (as .d.ts files).

If you're building an application/binary, you'll need to define a bin property in package.json and create a sub-directory under src/.

License

3-Clause-BSD licensed. See the LICENSE file for further details.