-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntFile.js
executable file
·56 lines (55 loc) · 1.42 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
module.exports = function(grunt) {
var srcPath = 'src/**/*.js';
var specsPath = 'specs/**/*spec.js';
var helperPath = 'specs/helpers/*.js';
grunt.initConfig({
uglify: {
options: {
mangle: false,
report : 'min',
// the banner is inserted at the top of the output
banner: '/*! <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/main.min.js': ['src/*']
}
}
},
jshint: {
all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'src/**/*.js']
},
jasmine : {
pivotal:{
// Your project's source files
src : srcPath,
// Your Jasmine spec files
options: {
specs : specsPath,
// Your spec helper files
helpers : helperPath
}
}
},
karma: {
unit: {
configFile: 'karma.conf.js',
autoWatch: true
}
},
watch: {
pivotal : {
files: [specsPath, srcPath],
tasks: ['jshint','jasmine', 'uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
// Default task.
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('default', ['test']);
};