forked from koroandr/log4ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
57 lines (55 loc) · 1.87 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module.exports = function(grunt) {
grunt.initConfig({
ts: {
default : {
tsconfig: true,
options: {
compiler: './node_modules/typescript/bin/tsc'
}
},
prod : {
tsconfig: 'tsconfig.build.json'
// options: {
// compiler: './node_modules/typescript/bin/tsc'
// }
},
demo : {
src: ["src/**/*.ts", "demo/**/*.ts"],
options: {
module: 'amd',
compiler: './node_modules/typescript/bin/tsc'
}
}
},
clean: ['src/**/*.js', 'src/**/*.js.map', 'test/**/*.js', 'test/**/*.js.map', 'demo/**/*.js', 'demo/**/*.js.map'],
jasmine: {
src : ['src/**/*.js', 'test/helpers/**/*.js'],
options : {
specs : ['test/**/*.js', '!test/helpers/**/*.js'],
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfig: {
baseUrl: ''
}
}
}
},
dts_bundle: {
prod: {
options: {
name: 'log4ts',
main: 'build/log4ts.d.ts'
}
}
}
});
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-serve');
grunt.loadNpmTasks('grunt-dts-bundle');
grunt.registerTask('demo', ['ts:demo', 'serve', 'clean']);
grunt.registerTask('test', ['clean', 'ts:default', "jasmine", 'clean']);
grunt.registerTask('prod', ['ts:prod', 'dts_bundle:prod']);
};