- Cleanup Gruntfile
This commit is contained in:
parent
bff0396a16
commit
21f48d8a3b
62
Gruntfile.js
62
Gruntfile.js
|
|
@ -1,5 +1,4 @@
|
|||
module.exports = function (grunt) {
|
||||
|
||||
//Initializing the configuration object
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
|
@ -7,24 +6,14 @@ module.exports = function(grunt) {
|
|||
less: {
|
||||
development: {
|
||||
options: {
|
||||
compress: true, //minifying the result
|
||||
compress: true,
|
||||
},
|
||||
files: {
|
||||
//compiling frontend.less into frontend.css
|
||||
"./public/assets/stylesheet/application.css": "./public/assets/stylesheet/application.less",
|
||||
"./public/assets/stylesheet/frontend.css": "./public/assets/stylesheet/frontend.less",
|
||||
//compiling backend.less into backend.css
|
||||
//"./public/assets/stylesheets/backend.css":"./app/assets/stylesheets/backend.less"
|
||||
}
|
||||
},
|
||||
website: {
|
||||
options: {
|
||||
compress: true, //minifying the result
|
||||
},
|
||||
files: {
|
||||
"./public/website_assets/stylesheet/main.css":"./public/website_assets/stylesheet/main.less",
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
concat: {
|
||||
options: {
|
||||
|
|
@ -79,63 +68,20 @@ module.exports = function(grunt) {
|
|||
},
|
||||
},
|
||||
phpunit: {
|
||||
classes: {
|
||||
classes: {},
|
||||
options: {}
|
||||
},
|
||||
options: {
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// js_frontend: {
|
||||
// files: [
|
||||
// //watched files
|
||||
// './bower_components/jquery/jquery.js',
|
||||
// './bower_components/bootstrap/dist/js/bootstrap.js',
|
||||
// './app/assets/javascript/frontend.js'
|
||||
// ],
|
||||
// tasks: ['concat:js_frontend','uglify:frontend'], //tasks to run
|
||||
// options: {
|
||||
// livereload: true //reloads the browser
|
||||
// }
|
||||
// },
|
||||
// js_backend: {
|
||||
// files: [
|
||||
// //watched files
|
||||
// './bower_components/jquery/jquery.js',
|
||||
// './bower_components/bootstrap/dist/js/bootstrap.js',
|
||||
// './app/assets/javascript/backend.js'
|
||||
// ],
|
||||
// tasks: ['concat:js_backend','uglify:backend'], //tasks to run
|
||||
// options: {
|
||||
// livereload: true //reloads the browser
|
||||
// }
|
||||
// },
|
||||
// less: {
|
||||
// files: ['./app/assets/stylesheets/*.less'], //watched files
|
||||
// tasks: ['less'], //tasks to run
|
||||
// options: {
|
||||
// livereload: true //reloads the browser
|
||||
// }
|
||||
// },
|
||||
// tests: {
|
||||
// files: ['app/controllers/*.php','app/models/*.php'], //the task will run only when you save files in this location
|
||||
// tasks: ['phpunit']
|
||||
// }
|
||||
// }
|
||||
});
|
||||
|
||||
// Plugin loading
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
//grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
//grunt.loadNpmTasks('grunt-phpunit');
|
||||
|
||||
// Task definition
|
||||
//grunt.registerTask('default', ['watch']);
|
||||
grunt.registerTask('default', ['less', 'concat']);
|
||||
grunt.registerTask('deploy', ['less', 'concat', 'uglify']);
|
||||
grunt.registerTask('js', ['concat']);
|
||||
grunt.registerTask('styles', ['concat']);
|
||||
grunt.registerTask('minify', ['uglify']);
|
||||
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue