Skip to content

pinf/pinf-for-mozilla-addon-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Status: DEV

PINF JavaScript Loader for Mozilla Addon-SDK

A Mozilla Addon-SDK module for loading PINF JavaScript Bundles.

Install

See ./examples/HelloWorld and refer to MDN Docs: Using third-party modules.

Usage

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!");
        }
    });
});

Test & Development

Requirements:

Install:

source bin/activate.sh

Run tests:

bin/test

Run examples:

test-example HelloWorld
run-example HelloWorld

Build

bin/build

License

UNLICENSE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published