ASP.NET MVC 4 has brought amazing tool for bundling multiple stylesheets or javascripts into one like this:
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.theme.css"));
Does NODE.JS have any modules to fulfil the same task - to bundle client javascript libraries into one? I've seen tools like browserify, uglifier, etc. but these require manual invocation of console commands (or may I have missed something?). Meanwhile, it would be nice to eliminate that excessive step and have middleware that could be easily integrated into express.js application, for instance.
And that's it. All node modules will no longer be bundled but will be left as require('module') .
The NODEJSAPP bundle part references the JavaScript code to start the application and a Node. js application profile which are both packaged in the CICS bundle. If the Node. js application has dependencies, those dependencies must be resolved by using NPM before the bundle is enabled.
Module bundlers are the way to organize and combine many files of JavaScript code into one file. A JavaScript bundler can be used when your project becomes too large for a single file or when you're working with libraries that have multiple dependencies.
There are several attempts to implement this, you can try them out and see which works best for you: bundle-up, brewer.js, connect-assetmanager
Not to mention automatic complication of stylus files into a single css file, also usable as express middleware.
Search npm for 'asset' and I'm sure you can find tons of these.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With