Closed lpotapczuk closed 7 years ago
Maybe one of these examples will help.
https://github.com/gulpjs/gulp/blob/master/docs/recipes/incremental-builds-with-concatenate.md https://github.com/gulpjs/gulp/blob/master/docs/recipes/only-pass-through-changed-files.md
gulp-changed only passes through changed files.
gulp-cached is an in-memory file cache for gulp.
gulp-remember remembers files that have passed through it. It pairs nicely with gulp-cached when you want to only rebuild the files that changed, but still need to operate on all files in the set.
I think this speaks to a concern I've been having as well:
Does the useref rebuild the combined JS file for every instance found in each html file? Or is there some intelligence to know X files turned into Y.js, so reuse Y.js if the same Y.js file is requested in a separate HTML file, with the same input files?
@mix3d yes it does rebuild the same files everytime. You would have to use something like in the examples I linked above.
Hi!!
I have setup, in which I have around 30 html files. All off them in the result use the same css and js files. Here is example of how each html file is ending:
Apart from that, I also inject css file:
Now, it works great for development! However, when I am building the production version, it takes around 15 minutes to go over all files, and build 3 files (utilities.js, lib.js and bundle.css).
How can I improve this setup, so that the building the production version is faster?