Skip to content

Instantly share code, notes, and snippets.

@skopp
Forked from FND/README
Created July 28, 2013 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skopp/6097617 to your computer and use it in GitHub Desktop.
Save skopp/6097617 to your computer and use it in GitHub Desktop.
RequireJS sample
#!/usr/bin/env sh
./node_modules/.bin/r.js -o name=main out=dist.js baseUrl=. optimize=none
define({
foo: "lorem ipsum",
bar: "dolor sit amet"
});
require(["util"], function(bar) {
bar();
});
require(["config"], function(config) {
return function() {
console.log(config.foo);
console.log(config);
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment