Skip to content

Instantly share code, notes, and snippets.

@degt
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save degt/c853f4c5dd9688a7f40c to your computer and use it in GitHub Desktop.
Save degt/c853f4c5dd9688a7f40c to your computer and use it in GitHub Desktop.
Grunt.js for laravel 5
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
config:{
themeName: 'mythemename',
themePath: 'public',
assetsPath: 'resources/assets',
bowerPath: 'bower_components'
},
php: {
default: {
options: {
hostname: 'localhost',
port: 8888,
base: 'public',
open: true,
keepalive: true,
silent: true
}
}
},
sass: {
dev: {
files: {
'<%= config.themePath %>/css/style.css': '<%= config.assetsPath %>/scss/style.scss'
}
}
},
watch: {
scss: {
files: ['<%= config.assetsPath %>/scss/*.scss'],
tasks: ['sass:dev'],
options: {
livereload: true
}
},
views: {
files: [
'resources/views/*.php',
'resources/views/**/*.php'
],
options: {
livereload: true
}
},
template: {
files: [
'<%= config.themePath %>/*.php',
'<%= config.themePath %>/**/*.php',
'<%= config.themePath %>/**/*.js'
],
options: {
livereload: true
}
},
configFiles: {
files: [ 'Gruntfile.js' ],
reload: true
}
},
concurrent: {
develop: {
tasks: ['php', 'watch'],
options: {
logConcurrentOutput: true
}
}
}
});
grunt.registerTask('default', ['concurrent:develop']);
}
{
"private": true,
"devDependencies": {
"grunt": "^0.4.5",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-watch": "^0.6.1",
"grunt-php": "^1.5.0",
"load-grunt-tasks": "^3.1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment