I am trying to stream sass into browsersync without gulp. Here is my code
function streamSass() {
dev.sassTasks.forEach(task => {
const sass = new Sass(task.src, task.dest, task.opts)
sass.write().then(() => {
const stream = fs.createReadStream(sass.dest.segments.absolutePath)
stream.pipe(browserSync.stream())
})
})
}
The Sass class just process and creates css file. When the function executed nothing happens on the side of the browsersync. Why is that? Assume that browsersync is running and is active when function is executed.