5 ms·
Use browserify — http://browserify.org http://browserify.org Compared to require.js browserify has the following benefits: * CommonJS module format which is l
by andreypopp 13y ago
Use browserify — http://browserify.org http://browserify.org
Compared to require.js browserify has the following benefits:
* CommonJS module format which is less verbose than AMD
* it uses node_modules/ dir to load dependencies from so
* ... you can use npm to install dependencies
* ... and if you use Node.js then that facilitates code sharing between your client and server
- streptomycin 13y agoNone of that addresses the complaints raised in the article.
- williamcotton 13y agoThe downside of this approach is all of the bootstrapping for running and developing your project is now a new environment on the server side. Don't forget that all of this tech carries a lot of mass and now you're having to maintain a number of different tools! If this is an open source project, you just went from: python -m SimpleHTTPServer || open index.html To: npm install && grunt build && grunt run ... And now as a person wanting to work on your code I have a whole slew of new tools to learn! It's not always as cut and dry of a decision...
- willurd 13y agoNot that this invalidates what you said, but NPM and Grunt (and just enough Node.js to use them) are required learning for JavaScript developers nowadays IMO.
- willurd 13y agoDoes whoever downvoted me care to explain why or offer another opinion?
- andypants 13y agoI didn't downvote you, but I use nodejs and I've never needed to use grunt. I don't think grunt is as pervasive as npm in the world of node.js.
- willurd 13y agoMaybe that's where the confusion was. I was talking about browser development. Thanks.
- hexasquid 13y agoGrunt is just generally a helpful little task runner and good for automating many things in general web development - running tests, concatenation / minification, linting, HTML / CSS / JS preprocessing and so on, if that floats your boat. It really is worth giving it a go.
- deleted 13y ago[deleted]