I'm relatively new to Gulp and looking to create a task that would clone a file, move it to a directory, then find and replace the following (keep note that the number of spaces proceeding the default!
is different)
$primary-color: #000 !default;
$secondary-color: #000 !default;
$trinary-color: #000 !default;
After the Gulp taks, would look like this, keeping the semicolon:
$primary-color: #000;
$secondary-color: #000;
$trinary-color: #000;
Guessing I'll need to use Gulp replace, doing the following:
gulp.task('variables', function() {
return gulp.src('src/scss/frontend/global/_variables.scss')
.pipe(replace(REGEX_HERE, ''))
.pipe(gulp.dest('src/scss/application/global/_variables.scss'));
});
but don't know the regex I'll need to remove both !default
and the preceeding spaces.