forked from keithclark/fuse-devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
77 lines (70 loc) · 2.13 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
65
66
67
68
69
70
71
72
73
74
75
76
77
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
i18n: grunt.file.readJSON('lang/en.json'),
jshint: {
options: {
strict: true,
curly: true,
eqeqeq: true,
eqnull: true,
browser: true,
camelcase: true,
indent: 4,
quotmark: 'single',
undef: true,
white: true,
unused: true
},
grunt: {
options: {
node: true
},
src: [
'tasks/**/*.js',
'gruntfile.js'
]
},
tests: {
options: {
node: true,
jasmine: true
},
src: 'tests/**/*_spec.js'
}
},
copy: {
options: {
noProcess: '**/*.{png,gif,jpg,ico}'
}
},
watch: {
grunt: {
files: [
'tests/**/*.js',
'tasks/**/*.js',
'gruntfile.js'
],
tasks: ['newer:jshint:grunt']
},
tests: {
files: 'tests/**/*_spec.js',
tasks: 'jasmine_node'
}
}
});
// Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('grunt-newer');
// Load extension build tasks
grunt.loadTasks('tasks');
// Register the default task
grunt.registerTask('build', 'Lint, test and build everything', ['jshint:grunt', 'jshint:tests', 'core', 'chrome', 'firefox', 'opera']);
// Register alais tasks so tooling can be switched
grunt.registerTask('test', 'Run all unit tests', 'jasmine_node');
grunt.registerTask('lint', 'Lint all project files', 'jshint');
};