This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathGruntfile.js
90 lines (73 loc) · 1.9 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
80
81
82
83
84
85
86
87
88
89
90
module.exports = function(grunt) {
'use strict';
grunt.config.init({
/* Project details */
pkg: grunt.file.readJSON('package.json'),
/* Paths */
path: {
source : 'source',
temp : '.tmp',
build : 'dist',
styles : 'kanso',
vendors : 'vendors',
views : 'example'
},
/* Banner */
banner:
'/**\n' +
' * <%= pkg.title %> v<%= pkg.version %>\n' +
' * <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %>\n' +
' * \n' +
' * 2014 <%= pkg.author.name %> | <%= pkg.author.url %>\n' +
' */\n\n',
/* Global tasks */
watch : require( './grunt/watch.js' ).task,
connect : require( './grunt/connect.js' ).task,
clean : require( './grunt/clean.js' ).task,
copy : require( './grunt/copy.js' ).task,
/* CSS tasks */
sass : require( './grunt/sass.js' ).task,
autoprefixer : require( './grunt/autoprefixer.js' ).task,
csscomb : require( './grunt/csscomb.js' ).task,
csso : require( './grunt/csso.js' ).task,
/* Notifications */
notify : require( './grunt/notify.js' ).task
}); // grunt.config.init()
/* Dependencies */
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
/* Tasks */
grunt.registerTask('default', [
'build',
'server'
]);
grunt.registerTask('build', [
'clean:build',
'styles',
'vendors',
'views',
'notify:build'
]);
grunt.registerTask('server', [
'connect:static',
'watch',
'notify:server'
]);
grunt.registerTask('vendors', [
'copy:vendors',
'notify:vendors'
]);
grunt.registerTask('views', [
'copy:views',
'notify:views'
]);
grunt.registerTask('styles', [
'sass:styles',
'autoprefixer:styles',
'csscomb:styles',
'csso:styles',
'copy:styles',
'clean:temp',
'notify:styles'
]);
};