grunt-type

Compile TypeScript files to JavaScript.

npm install grunt-type
1 downloads in the last day
2 downloads in the last week
17 downloads in the last month

grunt-type Build Status

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

nolib boolean

Do not include a default lib.d.ts with global declarations.

sourcemap boolean

Generates corresponding .map files.

declaration boolean

Generates corresponding .d.ts file

comments boolean

Emit comments to output.

target string

Specify ECMAScript target version: 'ES3' (default), or 'ES3'.

module string

Specify module code generation. Valid values are commonjs (default) or amd.

disallowbool boolean

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'
    }
  }
}
npm loves you