Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile time grows after every file change #575

Closed
karpiuMG opened this issue Dec 26, 2016 · 2 comments
Closed

Compile time grows after every file change #575

karpiuMG opened this issue Dec 26, 2016 · 2 comments

Comments

@karpiuMG
Copy link

I've changed my sass workflow recently to more modular way - a lot of partials in directories, instead of single stylesheet - and i've noticed, that time of compilation growed really bad. It continously grows when I apply some changes in my partials (it can grows even to 10 sec for single compile!):

ywqdcbu

My main stylesheet contains only imports of partials e.g.:
@import 'components/menu';
and so on...

This is my gulpfile:

gulp.task('sass', function() {
  return gulp.src('scss/**/*.scss') 
    .pipe(sourcemaps.init())
    .pipe(sass())
    .pipe(autoprefixer('> 0.5%'))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('css'))
});
gulp.task('watch:sass', function () {
    gulp.watch('scss/**/*.scss', gulp.series('sass'));
});
gulp.task('browser-sync', function() {
    browserSync.init({
        proxy: site,
        port: 8080,
        open: true,
        notify: false,
        files: ['./css/*.css', './js/*.js', '*.php', './include/**/*.php']
    });
});
gulp.task('default', gulp.parallel('watch:sass', 'browser-sync'));

Interesting thing: when i've moved all partials from internal directories to main /scss directory, problem doesn't appears.
I really want to preserve that modular directory tree and not go for a flat structure.

@xzyfer
Copy link
Collaborator

xzyfer commented Jan 9, 2017

Just released [email protected] which should address this issue. Please let us know if the problem persists.

@karpiuMG
Copy link
Author

Thanks, but problem still persists. I gave up and went for flat structure anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants