Last active
August 29, 2015 14:22
-
-
Save degt/c853f4c5dd9688a7f40c to your computer and use it in GitHub Desktop.
Grunt.js for laravel 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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