Status: DEV
A Mozilla Addon-SDK module for loading PINF JavaScript Bundles.
See ./examples/HelloWorld
and refer to MDN Docs: Using third-party modules.
lib/main.js
const { data } = require("sdk/self");
const { sandbox } = require("pinf-for-mozilla-addon-sdk");
sandbox(data.url("bundle.js"), function(sandbox) {
sandbox.main();
});
data/bundle.js
PINF.bundle("", function(require) {
require.memoize("/main.js", function(require, exports, module) {
exports.main = function(options) {
console.log("HelloWorld!");
}
});
});
Requirements:
Install:
source bin/activate.sh
Run tests:
bin/test
Run examples:
test-example HelloWorld
run-example HelloWorld
bin/build