forked from vgheri/ShopWithMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
64 lines (62 loc) · 1.63 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) {
// Initializes the Grunt tasks with the following settings
grunt.initConfig({
// A list of files, which will be syntax-checked by JSHint
jshint: {
files: ['Gruntfile.js', 'models/*.js', 'handlers/*.js', './*.js', 'test/*.js' ]
},
// Files to be concatenated … (source and destination files)
concat: {
js: {
src: ['lib/module1.js', 'lib/module2.js', 'lib/plugin.js'],
dest: 'dist/script.js'
},
css: {
src: ['style/normalize.css', 'style/base.css', 'style/theme.css'],
dest: 'dist/screen.css'
}
},
// … and minified (source and destination files)
uglify: {
dist: {
src: ['<%= concat.js.dest %>'],
dest: 'dist/script.min.js'
}
},
// Tasks being executed with 'grunt watch'
watch: {
files: '<%= jshint.files %>',
tasks: 'jshint'
},
cafemocha: {
testApi: {
src: 'test/*.js',
options: {
ui: 'bdd',
require: [
'should'
],
reporter: 'spec'
}
}
},
mochacov: {
options: {
ui: 'bdd',
reporter: 'html-cov',
require: ['should']
},
all: ['test/*.js']
}
});
// Load the plugins that provide the tasks we specified in package.json.
grunt.loadNpmTasks('grunt-contrib-jshint');
//grunt.loadNpmTasks('grunt-contrib-concat');
//grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-cafe-mocha');
grunt.loadNpmTasks('grunt-mocha-cov');
// This is the default task being executed if Grunt
// is called without any further parameter.
grunt.registerTask('default', ['jshint', /*'mochacov',*/ 'cafemocha'/*), 'concat', 'uglify'*/]);
};