3 ms·
Well, RequireJS is pretty solid for client side package management. With solid config files you can build out large client side applications that grab dependen
by jhspaybar 14y ago
Well, RequireJS is pretty solid for client side package management. With solid config files you can build out large client side applications that grab dependencies asynchronously, and it DOES work with everything.
- substack 14y agoand it DOES work with everything ... so long as you wrap all the files in the particular variant of define() function that works with requirejs (but not with other competing AMD function signatures). And then you might want to use some modules written for commonjs or node with `exports`, so you'll need a tool to transform those files. And then you'll probably want to compile the application into a single javascript bundle in production for performance. I'm not saying bower is any better in any of these respects, just that everything is terrible.
- Zr40 14y agoNope, RequireJS can load any kind of Javascript dependency, even if it doesn't use the AMD format. You can even specify dependencies for non-AMD scripts in the configuration object.[0] As for define(), there's only one AMD method signature: define([[name,] deps,] fn). Any loader that does not accept this signature cannot legitimately call itself an AMD loader. [0] http://requirejs.org/docs/api.html#config-shim http://requirejs.org/docs/api.html#config-shim
- Zr40 14y agoRequireJS manages load dependencies, not packages. It does not install and update them.