Code Monkey home page Code Monkey logo

Comments (7)

adyz avatar adyz commented on July 19, 2024

Hi Guys,

I have the same problem.

This is happening on other BrowserSync/Gulp setup, even the one recommended on BrowserSync website.
I also tried to remove autoprefixer & other pipes, but still getting injected all the main scss files.

from blendid.

lmartins avatar lmartins commented on July 19, 2024

After further testing i've came to the conclusion that is the access to the config file within the tasks that is slowing everything down.

Removing the references to "source", "build" and plugin configuration from the sass task everything goes back to normal values, including the autoprefixer and sourcemaps tasks.

Update: Actually scratch that, I had an error on the sass file and that was the reason for the fast output. It seems that splitting the gulp file in multiple files always slows things down.

from blendid.

greypants avatar greypants commented on July 19, 2024

Are you guys returning the streams in your tasks? 5.05 ms seems impossibly fast - like that the task is reporting finished as soon as it runs, instead of as soon as the sass is finished compiling.

from blendid.

greypants avatar greypants commented on July 19, 2024

Also, I pushed up some changes to the BrowserSync implementation over the weekend. Pull the latest and let me know if your issues persist with the new setup.

from blendid.

lmartins avatar lmartins commented on July 19, 2024

Hey Dan,
Thanks for the updates, i'll test them asap.
Regarding the compilation times, I can assure you the difference is quite noticeable. With my "common" gulp file the compilation is pretty much instant.

from blendid.

lmartins avatar lmartins commented on July 19, 2024

Hi Dan, im closing this one since it seems there's nothing to do here.
One quick note though. I've noticed on my setup that returning the task does add about 1s to each compilation, that is:

gulp.task('sass-build', function () {
  gulp.src( config.SASS.src )

vs this:

gulp.task('sass-build', function () {
  return gulp.src( config.SASS.src )

from blendid.

greypants avatar greypants commented on July 19, 2024

@lmartins Cool, thanks. So when you don't return the task, gulp will immediately report that the task has finished, regardless of whether or not the file has finished compiling. You must return a stream, or fire a callback if you want proper task reporting. Otherwise gulp has no way of knowing when it's complete, and immediately moves on to the next thing.

from blendid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.