An Attempt To Use Browserify
wiredcraft.comThe title is a bit misleading. Only a small part of the article mentions Browserify. I was hoping for the authors take on the struggles and efficiencies, as I'm at the point where I need to make the decision to use Browserify for my companies client heavy apps.
I'm using browserify to share code between the client and server, and it works just how you want it to. The api is very simple. There's a command line utility, but I decided to use the direct API to integrate it with my build system. You give it the files you want to bundle up, and then it gives you an output stream. Super simple, and works with no hassles.
The only problem I had was with recursive requires, but I created a pull request fixing the problem, and the team was very responsive about getting it fixed. The fix was integrated and put out the same day, so I didn't have to deal with any delays.
@hellopat In case you want know more about using browerify for client side development, do check this: http://dontkry.com/posts/code/using-npm-on-the-client-side.h... http://dontkry.com/posts/code/browserify-and-the-universal-m...
I'd be happy to answer any questions concerns you may have, I've had some decent experience with Browserify and I've loved it.
Do you have any opinions on Require.js vs Browserify? I've been using Require.js recently, but just discovered Browserify, and there seems to be mixed opinions on these two, but most blog articles and the like seem a little dated. Probably will have to build something non-trivial in both to know for sure, but if you have any insight on these two, would be glad to hear it.
Thanks for the offer!
My main concern is non-CommonJS libraries. I haven't really had any luck with any of the Browserify shim modules out there. Any jQuery plugin that I've used with Browserify I ended up modifying myself to support CommonJS. Even then, I'm not sure I was doing it right.
Any insight?
Hmm. I got the same issue while trying to use certain libraries. Not all of them is suitable for using in the client side. I changed some of the code and using the `module.exports` method to export it for browserify to use. Luckily most of the code is exposing an object already, so may not that hard to change it. The best approach may wrapper it and send the author of the lib a pull request. You may also check the video here. http://www.youtube.com/watch?v=YabwsSq6ASQ
We were just sharing an attempt to use it and explaining why we considered using Browserify. If you want more insight on it we will follow through with a more technical approach to it.
Er ... "I can now grab the user's webcam stream, generate a GIF, and let the user download or share it on an image hosting platform. And all of this is done in the front-end using a lightweight interface!" ... that's 3 lines (sorry: 4) of native JS, we need node-modules for this?
you can generate a gif with native js?
Not exactly a gif-image, because of license restrictions (which may also be a problem with any OSS library), but image/png, image/jpeg and (Chrome) image/webp and any animations built of these. (This is a political issue and not a technical one.) To have gif, you would have to implement the algorithm by your own and pay fees or ...
Yeap. Check out the code here. https://github.com/fraserxu/gifme There's an awesome library to do this. It's basically capture serval frames and use a algorithem to generate it.
I can't use this app unless it loses 80kb. Too bloated and heavyweight.
This blew my mind. I've been dabbling in Node, but I had no idea this much was possible. The GifMe demo would have been nearly enough, but wow, thanks for posting this.