forked from puikinsh/Bootstrap-Admin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
83 lines (53 loc) · 1.64 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
/* jshint node: true */
'use strict';
function getTask(name) {
return require('./src/tasks/' + name + '.js');
}
module.exports = function(grunt) {
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt, {
pattern: [
'grunt-*'
]
});
// Project configuration.
grunt.initConfig({
// Project Metadata
pkg: grunt.file.readJSON('package.json'),
config: grunt.file.readYAML('_config.yml'),
banner: '/**\n' +
'* Metis - <%=pkg.name %> v<%= pkg.version %>\n' +
'* Author : <%= pkg.author.name %> \n' +
'* Copyright <%= grunt.template.today("yyyy") %>\n' +
'* Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
'*/\n',
clean: getTask('clean'),
copy: getTask('copy'),
less: getTask('less'),
concat: getTask('concat'),
uglify: getTask('uglify'),
wiredep: getTask('wiredep'),
usebanner: getTask('usebanner'),
/**
* Lint JavaScript
*/
jshint: getTask('jshint'),
/**
* Build HTML from templates and data
*/
// assemble: getTask('assemble'),
htmlmin: getTask('htmlmin'),
// modernizr: getTask('modernizr'),
watch: getTask('watch'),
connect: getTask('connect'),
browserSync:getTask('browserSync')
});
// JS distribution task.
grunt.registerTask('dist-js', ['jshint', 'concat', 'uglify']);
// Full distribution task.
grunt.registerTask('dist', ['clean', 'copy', 'less', 'dist-js', 'usebanner']);
grunt.registerTask('serve', ['browserSync', 'watch']);
// Default task.
//grunt.registerTask('default', ['test', 'dist']);
grunt.registerTask('default', ['dist']);
};