Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have used <a href="http://requirejs.org/">requirejs</a> extensively in the past (implementation on <a href="http://www.bbc.co.uk/iplayer">BBC iPlayer</a> in 2010) and it works well. It can handle CommonJS modules, but it needs an additional wrapper, which I find annoying. If you want to use those modules in node.js as well, you need to use requirejs on the server side as well, which I don't like doing since it is not idiomatic node.js JavaScript.</p> <p>I have used <a href="https://github.com/medikoo/modules-webmake">webmake</a> and <a href="https://github.com/substack/node-browserify">browserify</a> in the past year on a few projects. Initially, the compilation step put me off, but having used it extensively this year, I can say that this is not an issue.</p> <p>Browserify has a watch function included, which works very well. Webmake can be hooked up to a watcher (such as <a href="https://github.com/mynyml/watchr">watchr</a>) or, you can use the <a href="https://github.com/gillesruppert/webmake-middleware">webmake-middleware</a> module, which can be used as part of an express or connect app. This has the advantage that rather than compiling the JavaScript on each save, it is only compiled when you actually request it. <a href="http://www.senchalabs.org/connect/">Connect</a> makes it trivial to create a server (also static), so you could create a tiny static node.js server to serve up your files if you want to develop your frontend without a backend.</p> <p>Bonus: no need for a build script as you always deal with the built code.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload