pinf-for-requirejs

*Status: DEV*

npm install pinf-for-requirejs
2 downloads in the last week
8 downloads in the last month

Status: DEV

PINF JavaScript Loader for RequireJS

A RequireJS plugin for loading PINF JavaScript Bundles.

Any portable bundle may be loaded. Modules and packages written for RequireJS may also be bundled and loaded via the PINF JavaScript Bundle Loader eliminating the need for RequireJS, RequireJS Optimizer and almond.

Install

npm install pinf-for-requirejs

Usage

http://localhost/index.html

<script src="require.js"></script>
<script>
    requirejs.config({
        paths: {
            pinf: "pinf.require"
        }
    });
    require([
        "pinf!bundle"
    ], function(sandbox) {
        sandbox.main();
    });
</script>

http://localhost/bundle.js

PINF.bundle("", function(require) {
    require.memoize("/main.js", function(require, exports, module) {
        exports.main = function(options) {
            console.log("HelloWorld!");
        }
    });
});

Test & Development

Requirements:

Run tests:

make test

Launch development workspace:

make run-dev
open http://localhost:8080/

Build

make build

License

UNLICENSE

npm loves you