-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·79 lines (64 loc) · 2.58 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
78
79
module.exports = function(grunt) {
'use strict'
grunt.config.init({
/* Project information */
pkg: grunt.file.readJSON('package.json'),
/* Paths */
path: {
tasks : 'grunt',
source : 'source',
build : 'build',
reports : 'reports',
images : 'images',
scripts : 'scripts',
styles : 'styles',
views : 'views',
data : 'data',
components : 'components',
misc : 'misc',
fonts : 'fonts'
},
/* Banner */
banner: {
expanded:
'/*\n' +
' * <%= pkg.name %>\n' +
' * v. <%= pkg.version %>\n' +
' * <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %>\n' +
' * \n' +
' * <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> | <%= pkg.author.url %>\n' +
' */\n\n',
compressed:
'/*!<%= pkg.name %> v<%= pkg.version %> | <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %> | <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>*/'
},
/* Local Development */
watch : require('./grunt/watch.js').task,
connect : require('./grunt/connect.js').task,
/* Styles */
less : require('./grunt/less.js').task,
autoprefixer : require('./grunt/autoprefixer.js').task,
csslint : require('./grunt/csslint.js').task,
csscomb : require('./grunt/csscomb.js').task,
csso : require('./grunt/csso.js').task,
/* Scripts */
concat : require('./grunt/concat.js').task,
uglify : require('./grunt/uglify.js').task,
/* Images */
imagemin : require('./grunt/imagemin.js').task,
svgmin : require('./grunt/svgmin.js').task,
/* Misc */
copy : require('./grunt/copy.js').task,
htmlmin : require('./grunt/htmlmin.js').task,
});
/* Dependencies */
require('time-grunt')(grunt);
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
/* Tasks */
grunt.registerTask('default', ['dev', 'build']);
grunt.registerTask('dev', ['connect', 'watch']);
grunt.registerTask('build', ['styles','copy:components', 'copy:data', 'scripts', 'images', 'misc']);
grunt.registerTask('styles', ['less', 'autoprefixer', 'csslint', 'csscomb', 'csso']);
grunt.registerTask('scripts', ['concat', 'uglify:build']);
grunt.registerTask('images', ['imagemin', 'svgmin']);
grunt.registerTask('misc', ['htmlmin', 'copy:misc']);
};