-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
64 lines (53 loc) · 1.62 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
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: {
options: {
jshintrc: '.jshintrc'
},
src: ['js/**/*.js', 'js.admin/**/*.js', 'Gruntfile.js']
}
},
watch: {
js: {
files: ['js/**/*.js', 'js.admin/**/*.js', 'js/templates/*.html', 'js.admin/templates/*.html'],
tasks: ['js']
},
css: {
files: ['css/**/*.css'],
tasks: ['css']
}
},
csso: {
index: {
options: {
report: 'min',
banner: '/*! <%= pkg.name %> - v<%= pkg.version %>*/\n'
},
files: {
'./index.css': ['css/**/*.css']
}
}
},
lmd: {
index: 'index',
index_pack: 'index+pack',
admin: 'admin'
}
});
// These plugins provide necessary tasks
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-csso');
grunt.loadNpmTasks('grunt-lmd');
grunt.loadNpmTasks('grunt-browser-sync');
// Default task
grunt.registerTask('default', ['css', 'js', 'watch']);
grunt.registerTask('css', ['csso']);
grunt.registerTask('js', ['jshint', 'lmd:index']);
// Release task
grunt.registerTask('release', ['jshint', 'lmd:index_pack', 'csso']);
};