-
Notifications
You must be signed in to change notification settings - Fork 461
/
Gruntfile.js
58 lines (46 loc) · 1.33 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
'use strict';
module.exports = function(grunt) {
var browsers = [
'Chrome',
'PhantomJS',
'Firefox'
];
if (process.env.TRAVIS){
browsers = ['PhantomJS', 'Firefox'];
}
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
karma: {
unit: {
options: {
files: [
'components/angular/angular.js',
'components/angular-mocks/angular-mocks.js',
'components/chai/chai.js',
'ngStorage.js',
'test/spec.js'
]
},
frameworks: ['mocha'],
browsers: browsers,
singleRun: true
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> | Copyright (c) <%= grunt.template.today("yyyy") %> Gias Kay Lee | MIT License */'
},
build: {
src: 'ngStorage.js',
dest: 'ngStorage.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('test', ['karma']);
grunt.registerTask('default', [
'test',
'uglify'
]);
};