-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
37 lines (29 loc) · 1.28 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
module.exports = function(grunt) {
'use strict';
require('time-grunt')(grunt);
// Prevent grunt from autoloading templates to avoid an error message
// see https://github.com/maenu/grunt-template-jasmine-istanbul/issues/8
require('load-grunt-tasks')(grunt, {
pattern: ['grunt-*', '!grunt-template-jasmine-requirejs']
});
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
config: grunt.file.readJSON('./tasks/config.json'),
clean: require('./tasks/clean')(grunt),
jshint: require('./tasks/jshint')(grunt),
jscs: require('./tasks/jscs')(grunt),
jasmine: require('./tasks/jasmine')(grunt),
requirejs: require('./tasks/requirejs')(grunt),
connect: require('./tasks/connect')(grunt),
watch: require('./tasks/watch')(grunt)
});
//Load tasks from the specified Grunt plugin.
grunt.loadNpmTasks('grunt-contrib-watch');
//Register an "alias task" or a task function.
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', [ 'lint', 'jasmine']);
grunt.registerTask('serve', ['connect:server']);
grunt.registerTask('dist', ['clean', 'test', 'requirejs']);
//Default
grunt.registerTask('default', ['requirejs', 'connect:server']);
};