Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
/ grunt-ts-watch Public archive

A bit hacky but also a bit smarter Grunt TypeScript task exploiting --watch mode

License

Notifications You must be signed in to change notification settings

noomorph/grunt-ts-watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-ts-watch

Build Status View this project on NPM View this project on NPM

A bit hacky but also a bit smarter Grunt TypeScript task exploiting tsc --watch mode for faster execution between runs.

How to use?

Add a section for ts-watch with a target (e.g. app) in Gruntfile.js like below:

{
/* ... */
    'ts-watch': {
        'app': { /*** below are the default values: ***/
            compiler: './node_modules/.bin/tsc',
            compilerArgs: [],
            timeout: 30000,
        }
    }
/* ... */
}

Make sure you load it somewhere like this (or any other suitable way for you):

grunt.loadNpmTasks('grunt-ts-watch');

Check task's functioning by running in CLI:

grunt --verbose ts-watch:app

Credits

This solution originated in this StackOverflow discussion.

Many thanks to @unional who suggested to look here at his workaround.

I owe you my inspiration.

License

Copyright (c) 2017- Yaroslav Serhieiev @noomorph

Licensed under the MIT license.

About

A bit hacky but also a bit smarter Grunt TypeScript task exploiting --watch mode

Resources

License

Stars

Watchers

Forks

Packages

No packages published