grunt-simple-typescript

0.0.3 • Public • Published

grunt-simple-typescript

A Grunt task for processing TypeScript files as modules. There are other grunt tasks that do this, but none in so simple and direct a manner.

Getting Started

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-simple-typescript --save-dev

To use add the simple-typescript task to your Grunt configuration.

Referencing a Node API in TypeScript

// myLib.ts - expects a node.d.ts in the same dir.
 
///<reference path='node.d.ts' />
import util = require('util');
util.puts("Howdy!");

Referencing another TypeScript file

// myLib.ts
class MyLib {
  run() {
    // Do something
  }
}
 
module.exports = MyLib;
// runner.ts
///<reference path='myLib.ts' />
 
new MyLib().run();

Transpiling your files

Manually run the task with grunt simple-typescript or include it as part of your build task:

grunt.registerTask('build', ['clean', 'simple-typescript', '...']);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0

Package Sidebar

Install

npm i grunt-simple-typescript

Weekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • mixonic