T
T
Timofey Usulov2017-01-23 16:18:20
Django
Timofey Usulov, 2017-01-23 16:18:20

Django gulpfile.js?

There is a gulpfile.js file, I can't figure out why reload and sass compilation don't work, only when 'gulp watch' is run, it doesn't track further.

var gulp = require('gulp'),
  sass = require('gulp-sass'),
  browserSync = require('browser-sync').create();
    reload = browserSync.reload;

gulp.task('sass', function() {
    return gulp.src('static/sass/**/*.sass')
    .pipe(sass())
    .pipe(gulp.dest('static/css'))
    .pipe(reload({stream: true}))
});

gulp.task('browserSync', function() {
  browserSync.init({
    notify: false,
    port: 8000,
    proxy: 'localhost:8000'
  })
});

gulp.task('watch', ['sass', 'browserSync'], function() {
  gulp.watch('static/scss/**/*.scss', ['sass']);
  gulp.watch('static/js/**/*.js', reload({stream: true}));
  gulp.watch('app/**/templates/**/*.html', reload({stream: true}));
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ovdienko, 2017-01-23
@doubledare

Maybe the port is clogged, it looks at the wrong files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question