You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AdminLTE/Gruntfile.js

68 lines
2.6 KiB

'use strict';
module.exports = function (grunt) {
// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
10 years ago
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
watch: {
// if any .less file changes in directory "build/less/" run the "less"-task.
files: ["build/less/*.less", "build/less/skins/*.less", "dist/js/app.js"],
10 years ago
tasks: ["less", "uglify"]
},
// "less"-task configuration
10 years ago
//this task will compile all less files upon saving to create both AdminLTE.css and AdminLTE.min.css
less: {
//Development not compressed
development: {
options: {
10 years ago
//Wether to compress or not
compress: false
},
files: {
// compilation.css : source.less
"dist/css/AdminLTE.css": "build/less/AdminLTE.less",
"dist/css/skins/skin-blue.css": "build/less/skins/skin-blue.less",
"dist/css/skins/skin-black.css": "build/less/skins/skin-black.less",
"dist/css/skins/skin-yellow.css": "build/less/skins/skin-yellow.less",
"dist/css/skins/skin-green.css": "build/less/skins/skin-green.less",
"dist/css/skins/skin-red.css": "build/less/skins/skin-red.less",
"dist/css/skins/skin-purple.css": "build/less/skins/skin-purple.less",
"dist/css/skins/_all-skins.css": "build/less/skins/_all-skins.less"
}
},
//production compresses version
production: {
options: {
10 years ago
//Wether to compress or not
compress: true
},
files: {
// compilation.css : source.less
"dist/css/AdminLTE.min.css": "build/less/AdminLTE.less",
"dist/css/skins/skin-blue.min.css": "build/less/skins/skin-blue.less",
"dist/css/skins/skin-black.min.css": "build/less/skins/skin-black.less",
"dist/css/skins/skin-yellow.min.css": "build/less/skins/skin-yellow.less",
"dist/css/skins/skin-green.min.css": "build/less/skins/skin-green.less",
"dist/css/skins/skin-red.min.css": "build/less/skins/skin-red.less",
"dist/css/skins/skin-purple.min.css": "build/less/skins/skin-purple.less",
"dist/css/skins/_all-skins.min.css": "build/less/skins/_all-skins.less"
}
}
10 years ago
},
//Uglify task info. Compress the js files.
10 years ago
uglify: {
options: {
mangle: true,
preserveComments: 'some'
10 years ago
},
my_target: {
files: {
'dist/js/app.min.js': ['dist/js/app.js']
}
}
}
});
// the default task (running "grunt" in console) is "watch"
grunt.registerTask('default', ['watch']);
};