1.0.1 • Published 7 years ago

node-typescript-starter v1.0.1

Weekly downloads
1
License
BSD-3-Clause
Repository
-
Last release
7 years ago

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.