-
Notifications
You must be signed in to change notification settings - Fork 11
/
Gruntfile.js
63 lines (59 loc) · 2.24 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
58
59
60
61
62
63
/*jshint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('./package.json'),
browserify: {
todomvc: {
src: 'examples/todomvc/tmp/app.js',
dest: 'examples/todomvc/js/bundle.js',
options: {
alias: ['./index:react-typescript']
}
},
twoWayBinding: {
src: 'examples/twoWayBinding/tmp/index.js',
dest: 'examples/twoWayBinding/js/bundle.js',
options: {
alias: ['./index:react-typescript']
}
}
},
clean : {
todomvc : './examples/todomvc/tmp',
twoWayBinding : './examples/twoWayBinding/tmp'
},
typescript: {
todomvc: {
src: ['declarations/*.d.ts','examples/todomvc/src/**/*.ts'],
dest: 'examples/todomvc/tmp',
options: {
base_path : 'examples/todomvc/src/',
module : 'commonjs',
target: 'es5',
sourcemap: false,
comments : true,
noImplicitAny: true,
ignoreTypeCheck: false
}
},
twoWayBinding: {
src: ['declarations/*.d.ts','examples/twoWayBinding/src/**/*.ts'],
dest: 'examples/twoWayBinding/tmp',
options: {
base_path : 'examples/twoWayBinding/src/',
module : 'commonjs',
target: 'es5',
sourcemap: false,
comments : true,
noImplicitAny: true,
ignoreTypeCheck: false
}
},
}
});
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('todoMVC', ['clean:todomvc','typescript:todomvc', 'browserify:todomvc', 'clean:todomvc']);
grunt.registerTask('twoWayBinding', ['clean:twoWayBinding','typescript:twoWayBinding', 'browserify:twoWayBinding', 'clean:twoWayBinding']);
};