5. // package/lib is a dependency we require
var lib = require('package/lib');
// some behavior for our module
function foo(){
lib.log('hello world!');
}
// export (expose) foo to other modules
exports.foo = foo;
17. Using the Add-on SDK you can create Firefox add-ons using
standard Web technologies: JavaScript, HTML, and CSS.
!
The SDK includes JavaScript APIs which you can use to
create add-ons, and tools for creating, running, testing, and
packaging add-ons.
18. Sources
• Writing Modular JavaScript With AMD, CommonJS
& ES Harmony written by Addy Osmani
• Mozilla developers network - developer.mozilla.org