grunt-direct-tsc

1.0.5 • Public • Published

grunt-direct-tsc

Grunt task to call tsc, as from the command line, but without forking a new node instance.

Watchmodus (-w) doesn't work yet, but if you file an issue, I will implement it in days.

Example:

module.exports = function(grunt) {
  'use strict';
  grunt.initConfig({

    tsc : {
      dist : {
        options : {
          args : [ "-p", "tsconfig-dist.json" ],
          debug : true
        }
      },
      test : {
        options : {
          args : [ "-p", "tsconfig-test.json" ],
          debug : true
        }
      }
    }

  });
  grunt.loadNpmTasks("grunt-direct-tsc");
};

Here we can see multiple configurations in which we can call the typescript compiler. I think it is nearly self-explaining:

grunt tsc:dist will be the equivalent of a ./node_modules/.bin/tsc -p tsconfig-dist.json, while grunt tsc:dev will do an equivalent of ./node_modules/.bin/tsc -p tsconfig-test.json.

There are no more configuration options.

/grunt-direct-tsc/

    Package Sidebar

    Install

    npm i grunt-direct-tsc

    Weekly Downloads

    7

    Version

    1.0.5

    License

    GPL-3.0

    Unpacked Size

    39.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • peter.horvath