generator-typescript-project
v0.0.0
Published
A yeoman generator for TypeScript projects
Maintainers
Readme
TypeScript Project Generator
TypeScript boilerplate.
Project Installation
This boilerplate can be used to start any TypeScript project. It also may be used for educational purposes. For a fresh installation, follow these steps.
Install Environment
- Install Node.js from https://nodejs.org.
- Install VSCode from http://code.visualstudio.com
- Install git from https://git-scm.com
- Install SourceTree from https://www.sourcetreeapp.com
- Clone https://github.com/sjohnsonaz/ts-boilerplate.git
- Run Command Prompt (
cmd)npm install typescript -gnpm install webpack -gnpm install nodemon -g
Configure VSCode
- Open Project
- Go to
File->Open Folder... - Open
ts-boilerplate
- Go to
- Configure hidden folders
- Go to
File->Preferences->Workspace Settings - In the right pane, add a line for
"files.exclude" - Add to the bottom of the
"files.exclude"section:
- Go to
"node_modules/": true,
"dist/": true- Save
Build and Run Project
Run Command Prompt (
cmd)npm install- To compile but not build, use
tsc - To run once, use
npm run dev - To run and watch for file changes, use
npm run watch - To run once and minify, use
npm run min
Run VSCode
- Navigate to
ts-boilerplate/src/html/index.html - Right click
index.html - Click
Reveal in Explorer - When Explorer launches, open the file in a Browser.
- Navigate to
Optionally, depending on your project, you may also run in Node
- Run Command Prompt (
cmd) - To run once, use
npm node - To run and watch for file changes, use
npm nodemon
- Run Command Prompt (
Test Project
Test in Browser
- Run VSCode
- Navigate to
ts-boilerplate/src/mocha/index.html - Right click
index.html - Click
Reveal in Explorer - When Explorer launches, open the file in a Browser
Test in Node
- Run Command Prompt (
cmd) npm test
- Run Command Prompt (
