I've a gulp task which combined all the SCSS and javascript use on the site. However while developing I usually use "gulp watch" command and it watches all files both, javascript and css.
The question is how can make gulp watch and combine only SCSS (app.scss) files? I tried to look into the gulp watch task and somehow it doesn't work for me.
gulpfile.js
var gulp = require('gulp'),
watch = require('gulp-watch'),
elixir = require('laravel-elixir'),
livereload = require('gulp-livereload');
require('laravel-elixir-livereload');
elixir(function(mix) {
mix.sass('app.scss');
mix.styles([
'app.css',
], null, 'public/css')
.styles([
... frontend css files ..
],'public/css/core.css' ,'resources/vendor')
// Admin CSS (core.css)
.styles([
... admin css files ..
], 'public/assets/admin/css/core.css', 'resources/vendor');
mix.scripts([
... core javascripts files ..
], null, 'resources/vendor')
.scripts(['app.js'], 'public/js/app.js')
.scripts([
... frontend javascripts files ..
.scripts([
... backend javascripts files ..
// Dashboard.js
.scripts([
'dashboard.js'
], 'public/assets/admin/js/dashboard.js');
});
"gulp styles" works but it won't keep watching so I've to run it manually.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VXP29x
via IFTTT
Aucun commentaire:
Enregistrer un commentaire