-
Notifications
You must be signed in to change notification settings - Fork 2
Modules
soliton4 edited this page Dec 6, 2014
·
8 revisions
Stability: 3 - Stable
- *promise
promiseLand assumes that a module loader is in use. promiseLand modules are compatible with commonjs as well as AMD style loaders.
simply use return in the main scope to define the export of the module.
// content of somefile.pland
var private = "some private module variable"
// the export:
return {
gimme: function(){
return private;
}
};
// execution ends at return (ofc)
// just want to be thorough - sorry for being boring
code.that.is.never.executed();
a compatibility subset for usage without a module loader exists, but it is uncertain at this point if it will be continued.
require is a keyword in promiseLand.
require expression
if a pro
found any errors?
missing something?
let me know