-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
29 lines (25 loc) · 947 Bytes
/
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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sync');
grunt.config.init(grunt.file.readJSON('./config/grunt.config.json'));
grunt.registerTask('jasmine', function() {
var done = this.async();
var Jasmine = require('jasmine');
var jasmine = new Jasmine();
jasmine.loadConfigFile('config/jasmine.config.json');
jasmine.onComplete(function(passed) {
if (!passed) {
grunt.log.error('Jasmine specs failed');
}
done();
});
jasmine.execute();
});
grunt.registerTask('build', ['ts:build']);
grunt.registerTask('run', []);
grunt.registerTask('test', ['build', 'jasmine']);
};