Last active
August 29, 2015 14:07
-
-
Save randomor/0c5f0506d86e7817c3b0 to your computer and use it in GitHub Desktop.
For using gulp-include with laravel-elixir
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
//Currently I'm creating the processed coffee file in a temporary directory inside `resources/assets/coffee` for it to be picked up by `mix.coffee` | |
//And this task also doesn't work for js, scss or css, even though elixir does provide some native support for `@import`. | |
//Alternative ways of integrate `gulp-include` with `laravel-elixir` is thus deeply appreciated. | |
elixir.extend('includeFiles', function(src, output) { | |
var baseDir = this.preprocessors.baseDir + 'coffee/'; | |
src = this.buildGulpSrc(src, baseDir, '**/*.coffee'); | |
gulp.task('include', function() { | |
return gulp.src(src) | |
.pipe(include()) | |
.pipe(gulp.dest(output || 'resources/assets/coffee/processed')); | |
}); | |
this.registerWatcher('include', baseDir + '/**/*'); | |
return this.queueTask('include'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment