Template environment for TypeScript development. It contains a simple setup for quickly getting started with a new TypeScript project using Grunt to build, watch (build continuously), clean and release the project.
First, make sure you have Node installed on your system. Then, checkout the project with:
git clone https://github.com/clovergaze/typescript-environment-template
Next, change into the projects root folder and install all necessary dependencies with:
npm install
After installing all dependencies, you can start using the project. See the following sections for more details.
To build the project run:
npm run build
This will run Grunt's build
pipeline (via its default
task), that lints and transpiles the sources, including files
found under ./test
. See the scripts
section in package.json
and the Grunt configuration in Gruntfile.js
for more
details.
You can also use a continuous build mode for development, if you have built the project at least once using the build
task. This will continuously rebuild the sources, if anything changes.
To start the continuous build mode, run:
npm run watch
Have a look at the watch
task in Gruntfile.js
for more detailed information.
Run tests with:
npm test
This executes test cases inside the './test'
folder using Mocha.
To build a release version of the project run:
npm run release
This will create a folder called './dist'
that will contain only the necessary files in to to run the project.
Tor remove all leftover files from the build process, run:
npm run clean
Cleaning will also include the removal of the './dist'
folder.
If you encounter any issues or bugs, we would appreciate it if you could report them on the corresponding GitHub page. Thank you for your help in improving this project.
Johannes Hillert (GitHub)
Copyright (c) 2017 Johannes Hillert. Licensed under the MIT license, see the included LICENSE file for details.