grunt-type
Compile TypeScipt source code.
Getting Started
This plugin requires Grunt ~0.4.0
and TypeScript 0.9.0
.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-type --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-contrib-copy');
*This plugin was designed to work with Grunt 0.4.x and TypeScript 0.9.x (currently in alpha). If you're still using grunt v0.3.x it's strongly recommended that you upgrade.
Type task
Run this task with the grunt type
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
boolean
nolib Do not include a default lib.d.ts with global declarations.
boolean
sourcemap Generates corresponding .map files.
boolean
declaration Generates corresponding .d.ts file
boolean
comments Emit comments to output.
string
target Specify ECMAScript target version: 'ES3'
(default), or 'ES3'
.
string
module Specify module code generation. Valid values are commonjs
(default) or amd
.
boolean
disallowbool Throw error for use of deprecated bool
type.
Usage Examples
type: {
release: {
files: [
{src: ['src/**/*.ts'], dest: 'dist/app.js'}
],
options: {
sourcemap: true,
target: 'es5'
}
}
}