npm install structurejs#structurejs
A solution to structure js codes in one file.
for browser:
<javascript src="build/structure.js"></script>
...
for node:
var structure = require('structurejs');
...
structure([
/ structured codes /
function(ths, cfg){
console.log(cfg.greeting); // 'hello world'
}
], {
/ configuration /
greeting: 'hello world'
});