-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.js
64 lines (61 loc) · 2.05 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
grunt.initConfig({
dist: 'dist',
pkg: grunt.file.readJSON('package.json'),
uglify: {
options:{
banner: '/*! JasperJs https://github.com/jasperjs/jasper-application - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
},
base: {
src: '<%= dist %>/jasper.js',
dest: '<%= dist %>/jasper.min.js'
}
},
typescript: {
base: {
src: ['src/_references.ts'],
dest: '<%= dist %>/jasper.js',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
sourceMap: true,
declaration: true,
references: [
'typed/angular.d.ts'
]
}
},
tests: {
src: ['src/_references.ts', 'test/**/*.ts'],
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
sourceMap: false,
declaration: false,
references: [
'typed/angular.d.ts',
'typed/angular-mocks.d.ts',
'typed/jasmine.d.ts'
]
}
}
},
karma: {
unit: {
configFile: 'karma.conf.js'
},
ci: {
configFile: 'karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
}
}
});
grunt.registerTask('default', ['typescript', 'uglify']);
grunt.registerTask('test', ['default', 'typescript:tests', 'karma']);
grunt.registerTask('test-ci', ['typescript:tests', 'karma:ci']);
};