// Create a scss theme file
gulp.task('theme-scss', function() {
return gulp.src(['./retailer-theme.json']).on('error', gutil.log)
.pipe(replace('/.*/m', 'hello')).on('error', gutil.log)
//.pipe(jsonSass({prefix: '$theme: '})).on('error', gutil.log)
/*.pipe(rename({
dirname: './',
basename: 'retailer',
suffix: '-theme',
extname: '.scss'
})).on('error', gutil.log)*/
.pipe(gulp.dest(APP_DIR + '/scss/variables/')).on('error', gutil.log)
})
Trying the replace everything in the file with the word hello.enter code here
The text in retailer-theme.json is text
.pipe(replace('text', 'hello')).on('error', gutil.log)
The above line works as expected
So I had to create a regexp object, would of been nice if they had this in the docs