Created
November 1, 2015 13:31
-
-
Save samueleresca/8dbe86fa226a4ba2ec07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
//REQUIRED MODULES | |
grunt.loadNpmTasks('grunt-typescript'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-open'); | |
//________________ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
connect: { | |
server: { | |
options: { | |
port: 8080, | |
base: './' | |
} | |
} | |
}, | |
typescript: { | |
base: { | |
src: ['Scripts/**/*.ts'], //all *.ts files | |
dest: 'Scripts/compiled/main.js', //compiled inside main.js | |
options: { | |
module: 'amd', | |
target: 'es5' | |
} | |
} | |
}, | |
watch: { | |
files: '**/*.ts', //watch all *.ts files | |
tasks: ['typescript'] // run the typescript task | |
}, | |
open: { | |
dev: { | |
path: 'http://localhost:8080/index.html' | |
} | |
} | |
}); | |
grunt.registerTask('default', ['connect', 'open', 'watch']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment