Skip to content

Instantly share code, notes, and snippets.

@rtgnx
Created August 28, 2015 15:40
Show Gist options
  • Save rtgnx/59a9c53e36bc74eebe62 to your computer and use it in GitHub Desktop.
Save rtgnx/59a9c53e36bc74eebe62 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
concat: {
options: {
separator: ';',
},
js_vendor: {
src: [
'./bower_components/jquery/dist/jquery.js',
'./bower_components/bootstrap/dist/js/bootstrap.js',
],
dest: './public/assets/js/vendor.js',
},
jsapp: {
src: [
'./resources/views/js/*.js',
],
dest: './public/assets/js/app.js',
},
css_vendor: {
src: [
'./bower_components/bootstrap/dist/css/bootstrap.min.css',
'./bower_components/bootstrap/dist/css/bootstrap-theme.min.css',
],
dest: './public/assets/css/vendor.css',
},
css_app: {
src: [
'./resources/views/css/*.css',
],
dest: './public/assets/css/app.css',
}
},
uglify: {
},
less: {
},
phpunit: {
},
watch:{
css_app: {
files: './resources/views/css/*.css',
tasks: ['concat:css_app'],
options: {
livereload: true,
},
},
jsapp: {
files: './resources/views/js/*.js',
tasks: ['concat:jsapp'],
options: {
livereload: true,
}
},
css_vendor: {
files: "./bower_components/bootstrap/dist/css/*.css",
tasks: ['concat:css_vendor'],
options: {
livereload: true,
},
},
js_vendor: {
files: [
'./bower_components/bootstrap/dist/js/bootstrap.js',
'./bower_components/jquery/dist/jquery.js',
],
tasks: ['concat:js_vendor'],
options: {
livereload: true,
},
},
},
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-phpunit');
grunt.registerTask('default',['watch','concat:jsapp','concat:js_vendor','concat:css_vendor','concat:css_app']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment