Answer the question
In order to leave comments, you need to log in
Gulp passing parameters between tasks?
Greetings Toaster Members!
I will try to explain in more detail the essence of my problem.
In general, we have two asset location directories related to two applications:
$assets_dir = ${project_dir}/apps/public/assets
$assets_dir = ${project_dir}/apps/admin/assets
then the path to the css-style source is as follows:
${assets_dir }/stylesheets/src/style.scss
I need to put the assembled style bundle in a directory below src:
${assets_dir}/stylesheets/bundle.css
// gulpfile.js
const gulp = require('gulp');
const path = require('path');
const assets_dir = './apps/*/assets';
gulp.task('sass', function(cb) {
// get watched full_path?
});
gulp.task('watch', function () {
gulp.watch(assets_dir + '/stylesheets/src/**/*.scss', ['sass']);
});
gulp.task('default', ['watch']);
ulp.watch(assets_dir + '/stylesheets/src/**/*.scss').on('change', function(file) { console.log(file.path); });
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question