M
M
mUchenik2018-03-23 19:43:44
gulp.js
mUchenik, 2018-03-23 19:43:44

gulp cached? How to fix?

All good and positive!
Dear experts, how can I fix the following problem:
Opencart site engine on openserver
Installed node.js
Installed gulp
Decided to check^
created C:\OSPanel\domains\opencart.loc\catalog\view\theme\my_sk_theme\template\common\ copied header there .twig I
started gulp and decided to check its work: before I registered a unit, I looked, everything works. I decided to check once again I wrote "555" changes appeared, BUT after I returned everything to its original state in the header.twig file, "555" did not disappear anywhere, moreover, after deleting header.twig "555" disappear, BUT if i copy header.twig file from C:\OSPanel\domains\opencart.
I cleared the browser cache, restarting the entire computer does not help ...
What should I do? This is where the cache is hung up?
here is the current content of gulpfile.js

// Подключаем Gulp и все необходимые библиотеки
var gulp           = require('gulp'),
    gutil          = require('gulp-util' ),
    sass           = require('gulp-sass'),
    browserSync    = require('browser-sync'),
    cleanCSS       = require('gulp-clean-css'),
    autoprefixer   = require('gulp-autoprefixer'),
    bourbon        = require('node-bourbon'),
    ftp            = require('vinyl-ftp');

// Обновление страниц сайта на локальном сервере
gulp.task('browser-sync', function() {
  browserSync({
    proxy: "opencart.loc",
    notify: false
  });
});

// Компиляция stylesheet.css
gulp.task('sass', function() {
  return gulp.src('catalog/view/theme/my_sk_theme/stylesheet/stylesheet.sass')
    .pipe(sass({
      includePaths: bourbon.includePaths
    }).on('error', sass.logError))
    .pipe(autoprefixer(['last 15 versions']))
    .pipe(cleanCSS())
    .pipe(gulp.dest('catalog/view/theme/my_sk_theme/stylesheet/'))
    .pipe(browserSync.reload({stream: true}))
});

// Наблюдение за файлами
gulp.task('watch', ['sass', 'browser-sync'], function() {
  gulp.watch('catalog/view/theme/my_sk_theme/stylesheet/stylesheet.sass', ['sass']);
  gulp.watch('catalog/view/theme/my_sk_theme/template/**/*.twig', browserSync.reload);
  gulp.watch('catalog/view/theme/my_sk_theme/js/**/*.js', browserSync.reload);
  gulp.watch('catalog/view/theme/my_sk_theme/libs/**/*', browserSync.reload);
});

// Выгрузка изменений на хостинг
gulp.task('deploy', function() {
  var conn = ftp.create({
    host:      'hostname.com',
    user:      'username',
    password:  'userpassword',
    parallel:  10,
    log: gutil.log
  });
  var globs = [
  'catalog/view/theme/my_sk_theme/**'
  ];
  return gulp.src(globs, {buffer: false})
  .pipe(conn.dest('/path/to/folder/on/server'));
});

gulp.task('default', ['watch']);

When you try to prescribe something else, nothing happens, more precisely, there are no changes in the browser ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serj-One, 2018-03-23
@mUchenik

In OpenCart itself, it hung. Clear the cache and disable caching.
5ab536cb488d2353473749.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question