-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (56 loc) · 1.83 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
64
65
66
var destination = 'releases';
var source_ts = 'src';
module.exports = function(grunt) {
grunt.initConfig({ // https://github.com/k-maru/grunt-typescript
pkg: grunt.file.readJSON('./package.json'),
typescript: {
base: {
src: [source_ts+'/**/*.ts'],
dest: destination,
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
basePath: source_ts,
// sourceMap: true,
// declaration: true
}
}
},
clean: [destination],
shell: {
install: {
command: function() {
return 'bower cache clean && bower install && cd src && npm install';
},
options: {
stdout: true,
stderr: true,
stdin: true
}
},
},
tsd: { // https://github.com/DefinitelyTyped/tsd
refresh: {
options: {
// execute a command
command: 'reinstall',
//optional: always get from HEAD
latest: true,
// specify config file
config: 'tsd.json',
// experimental: options to pass to tsd.API
opts: {
// props from tsd.Options
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-tsd');
grunt.registerTask('default', ['typescript']);
grunt.registerTask('run', ['default']);
grunt.registerTask('install', ['shell:install', 'tsd:refresh']);
};