|
|
@ -7,7 +7,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function (grunt) {
|
|
|
|
module.exports = function (grunt) {
|
|
|
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
grunt.initConfig({
|
|
|
|
grunt.initConfig({
|
|
|
@ -95,19 +95,19 @@ module.exports = function (grunt) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// Optimize images
|
|
|
|
// Optimize images
|
|
|
|
image: {
|
|
|
|
image: {
|
|
|
|
dynamic: {
|
|
|
|
dynamic: {
|
|
|
|
files: [{
|
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
expand: true,
|
|
|
|
cwd: 'build/img/',
|
|
|
|
cwd: 'build/img/',
|
|
|
|
src: ['**/*.{png,jpg,gif,svg}'],
|
|
|
|
src: ['**/*.{png,jpg,gif,svg}'],
|
|
|
|
dest: 'dist/img/'
|
|
|
|
dest: 'dist/img/'
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// Validate JS code
|
|
|
|
// Validate JS code
|
|
|
|
jshint: {
|
|
|
|
jshint: {
|
|
|
|
options: {
|
|
|
|
options: {
|
|
|
@ -123,7 +123,7 @@ module.exports = function (grunt) {
|
|
|
|
src: 'dist/js/pages/*.js'
|
|
|
|
src: 'dist/js/pages/*.js'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
csslint: {
|
|
|
|
csslint: {
|
|
|
|
options: {
|
|
|
|
options: {
|
|
|
|
csslintrc: 'build/less/.csslintrc'
|
|
|
|
csslintrc: 'build/less/.csslintrc'
|
|
|
@ -132,7 +132,7 @@ module.exports = function (grunt) {
|
|
|
|
'dist/css/AdminLTE.css',
|
|
|
|
'dist/css/AdminLTE.css',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// Delete images in build directory
|
|
|
|
// Delete images in build directory
|
|
|
|
// After compressing the images in the build/img dir, there is no need
|
|
|
|
// After compressing the images in the build/img dir, there is no need
|
|
|
|
// for them
|
|
|
|
// for them
|
|
|
@ -162,4 +162,4 @@ module.exports = function (grunt) {
|
|
|
|
|
|
|
|
|
|
|
|
// The default task (running "grunt" in console) is "watch"
|
|
|
|
// The default task (running "grunt" in console) is "watch"
|
|
|
|
grunt.registerTask('default', ['watch']);
|
|
|
|
grunt.registerTask('default', ['watch']);
|
|
|
|
};
|
|
|
|
};
|
|
|
|