shakyShane/jekyll-gulp-sass-browser-sync

Gulp not compiling scss into css

brttwrd opened this issue · 3 comments

This is what I ended up with after tweaking. It doesn't compile main.scss into css in the assets/css folder or the _site/assets/css/folder. Not sure where the error could possibly be. The watcher works but it always finishes and says 0 files changed.

gulp.task('sass', function () {
    return gulp.src('assets/css/main.scss')
      .pipe(sass({
          includePaths: ['css'],
          onError: browserSync.notify
      }))
      .pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true }))
      .pipe(gulp.dest('_site/assets/css'))
      .pipe(browserSync.reload({stream:true}))
      .pipe(gulp.dest('assets/css'));
});
gulp.task('watch', function () {
    gulp.watch('assets/css/**', ['sass']);
    gulp.watch(['index.html', '_layouts/*.html', '_includes/*'], ['jekyll-rebuild']);
    gulp.watch('_jade/*.jade', ['jade']);
});

I am having the same issue, which Travis Neilson from DevTips tried to address by updating the devDependencies on one of his projects on YouTube that I am following, but the sass will not compile the css. Please help!

I now see that the gulp file is sending main.scss to '_site/assets/css/' but is literally sending main.scss. It isn't compiled into css, just copied in.

I had the same problem on Windows 8.1.
This is my solution.

Install the [npm-check-updates package[(https://www.npmjs.com/package/npm-check-updates)

npm install -g npm-check-updates

Show new dependencies

ncu

Update dependencies in the package.json file

ncu -u

Install new dependencies

npm install