-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
43 lines (39 loc) · 1.17 KB
/
gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// <binding BeforeBuild='default' />
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
typescript: {
base: {
src: ['ts/**/*.ts', '!ts/typings/**/*.*'],
dest: 'js/app.js',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
basePath: 'ts',
sourceMap: false,
declaration: false,
comments: false
}
}
},
watch: {
gruntfile: {
files: ['gruntfile.js'],
},
typescripts: {
files: ['<%= typescript.base.src %>'],
tasks: ['typescript:base'],
options: {
spawn: false,
},
}
}
});
// Load Tasks
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-watch');
// Definitions
grunt.registerTask('build', ['typescript:base']);
grunt.registerTask('default', ['build']);
};