Skip to content

Instantly share code, notes, and snippets.

@inkredabull
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inkredabull/8759676 to your computer and use it in GitHub Desktop.
Save inkredabull/8759676 to your computer and use it in GitHub Desktop.
JS Client-side Package Management

At work, we're considering moving away from Require.js towards Browserify. I've spent some time reading up on; following are thoughts and resources.

tl;dr Browserify is worth introducing into our stack even though a Best Practice in the space hasn't emerged; Traceur is worth considering to hedge bets until ES6 is ready

Pro

  • took 30 mins to implement a feature on Friday using Browserify whose solution with our custom Require.js-based framework had eluded me for hours
  • building a center of excellence around an emerging (possible) standard
  • experience can be turned into blog posts
  • leverages the node package management module system -IMO dominant in the space (although I don't see us publishing our libs anytime soon)

Con

  • introducing yet another technology to do what a solution in our stack already does (well ahead of "holy grail" ES6 adoption)
  • for feature on Friday, had to use local JS libs as they weren't on npmjs.org

Concerns:

  • with custom Require.js-based framework, we have a way to include and initialize libs on a page; will we have to recreate the wheel with Browserify?
  • effort (minor) to module.exports'ify all existing libs under custom Require.js-based framework
  • advantage of current usage of Require.js: all libs sent to browser - browserify gets around with debug flag and source maps?

For

http://esa-matti.suuronen.org/blog/2013/03/22/journey-from-requirejs-to-browserify/

Against

https://twitter.com/tomdale/status/289881486428086272

JS Package Management

Extremely good read

https://plus.google.com/+PaulIrish/posts/cHLhcSfJyJo

General overview

http://wibblycode.wordpress.com/2013/01/01/the-state-of-javascript-package-management/ http://superbigtree.tumblr.com/post/58075340096/my-strategy-for-client-side-package-managers-choosing http://www.reddit.com/r/javascript/comments/vc9d9/npm_vs_jam_requirejs_vs_browserify_vs_ender/

Misc good links

http://dontkry.com/posts/code/browserify-and-the-universal-module-definition.html http://stackoverflow.com/questions/17886902/how-do-you-add-browserify-to-a-yeoman-project http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

Traceur

http://addyosmani.com/blog/author-in-es6-transpile-to-es5-as-a-build-step-a-workflow-for-grunt/ https://github.com/google/traceur-compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment