Friday, March 30, 2012

True universal JavaScript modules with write-once-run-anywhere Jasmine specs » The Log Book of Manuel Kiessling

True universal JavaScript modules with write-once-run-anywhere Jasmine specs » The Log Book of Manuel Kiessling: "As a JavaScript developer writing general-purpose libraries, you probably wish you could go fully universal, that is, you might want to create a library:

that can be used in the browser and in Node.js – without any hacks for either platform, and without code-duplication
that transparently utilizes AMD via RequireJS in the browser and CommonJS via require in Node.js – without any hacks for either platform, and without code-duplication
with a Jasmine spec suite which runs in the browser and in Node.js – without any hacks for either platform, and without code-duplication
"

'via Blog this'