Last active
February 25, 2017 10:56
-
-
Save fatrex/ea3c8fe7ab9867e71e22 to your computer and use it in GitHub Desktop.
Gulp for Symfony 2
This file contains hidden or 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
| var gulp = require('gulp'); | |
| var browserSync = require('browser-sync'); | |
| var reload = browserSync.reload; | |
| var shell = require('gulp-shell'); | |
| gulp.task('serve', ['dump'], function() { | |
| browserSync({ | |
| proxy: "local.symfony.domain/app_dev.php" | |
| }); | |
| gulp.watch("path/to/less/**/*.less", ['dump', reload]); | |
| gulp.watch("path/to/js/**/*.js", ['dump', reload]); | |
| gulp.watch("path/to/Controller/**/*.php").on('change', reload); | |
| gulp.watch("path/to/views/**/*.html.twig").on('change', reload); | |
| }); | |
| gulp.task('dump', shell.task([ | |
| 'touch path/to/main/less/file.less' | |
| ])) | |
| gulp.task('default', ['serve']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment