Giter Site home page Giter Site logo

Comments (5)

es128 avatar es128 commented on August 29, 2024

Brunch also only supports incremental building while watching. Every invocation of brunch build is a full rebuild.

from brunch-guide.

rosenfeld avatar rosenfeld commented on August 29, 2024

Okay, thanks for letting me know!

from brunch-guide.

rosenfeld avatar rosenfeld commented on August 29, 2024

What about dynamic files watching in watch mode as entry points?

from brunch-guide.

es128 avatar es128 commented on August 29, 2024

Honestly I'm not totally sure what that even means, but probably not. Brunch is a build system, which is why it's more apt to compare to grunt and gulp. Webpack is first a module loading strategy (compare with browserify) and has grown into a full-blown build system as well, albeit much more opinionated than Brunch at least in terms of module structure with its overloaded require processing and such. The closest thing Brunch provides to the concept of entry points is the autoRequire option, but it does not go from there and resolve via your require statements everything else that needs to be built. You need to specify in the config how you want your source files built and concatenated.

from brunch-guide.

rosenfeld avatar rosenfeld commented on August 29, 2024

Ah, got, so it isn't really an option I would consider. The Rails Assets Pipeline (sprockets) declares the dependencies on each file much like in most programming languages supporting import/require without returning values, which was great when I started working with web apps because it was an easy way to organize the modules dependencies. Grails takes a different approach, which is more similar to Brunch's approach if I understood it correctly, by specifying the dependencies as configurations, which I find a bit fragile when compared to specifying directly in the files.

Sprockets use some magical comments in the files header to specify the dependencies but the dependencies will have to export directly to window so that they could be used, while it's possible to keep things more isolated with the require mechanism in Webpack.

But the main advantage of Webpack over Sprockets (besides source maps support) is that it's easy to set up which code should be loaded on demand, which is almost impossible to set up with Sprockets in a sane way. From the performance data I have been collecting in the last months the size of the resources is the main reason for the slow initial loading time some users experience (about 10% will take over 5s to load a 1MB minified JS file (~200KB gzipped)).

But thanks for clarifying what is the category of Brunch! This is very helpful!

Cheers!

from brunch-guide.

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.