-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
68 lines (66 loc) · 1.92 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
/*global module,require */
module.exports = function (grunt) {
'use strict';
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
paths: {
app: 'app',
css: 'css',
sass: 'sass',
build: 'dist',
temp: '.temp',
test: 'test',
images: 'images',
bower: 'lib',
fonts: 'fonts',
example: 'example',
gruntConfig: 'gruntconfig/'
},
jshint: {
options: require('./gruntconfig/jshint_options'),
prod: require('./gruntconfig/jshint_prod.js')
},
clean: require('./gruntconfig/clean.js'),
compass: {
options: require('./gruntconfig/compass_options.js'),
dev: require('./gruntconfig/compass_dev.js'),
prod: require('./gruntconfig/compass_prod.js')
},
watch: require('./gruntconfig/watch.js'),
copy: require('./gruntconfig/copy.js'),
concurrent: require('./gruntconfig/concurrent.js'),
scsslint: require('./gruntconfig/scsslint.js'),
autoprefixer: require('./gruntconfig/autoprefixer.js'),
connect: require('./gruntconfig/connect.js')
});
// Define tasks.
grunt.registerTask('default', [
'build'
]);
grunt.registerTask('build', [
'clean:release',
'concurrent:buildRelease'
]);
grunt.registerTask('serve', [
'clean:temp',
'concurrent:buildDev',
'autoprefixer:watch',
'connect:livereload',
'concurrent:watchDev'
]);
grunt.registerTask('serve-build', [
'build',
'connect:release:keepalive'
]);
grunt.registerTask('test', [
'jshint:prod',
'scsslint'
]);
grunt.registerTask('test-dev', [
'serve',
'jshint',
'watch:test'
]);
};