If are you tired of customizing your library to allow it's use from both npm and require.js, try bpm, it's easier!
The same code work in node.js and in your users browser!
Just a proof of concept by now, but, it work! Look a sample working on this page . And it will work on every evergreen browser, on desktop, smart phone or tablet.
You can improve it. You can customize it. You can help us!
The idea is simple: you include bpm.js with a normal script tag, and than you choose a package to start your js application. The package you specify is download for a public repo via ajax, saved to local file system, and required from there.
<script src="bpm.js"></script> <script> bpm.start("test","0.1.1",function(){ var foo = require("foo"); var baz = require("baz"); }); </script>
This is main.js from test package:
var foo = require("foo"); var baz = require("baz"); exports.log = function() { foo.ler(); baz.mania(); }
BPM is open source, and always will be.
This give you the possibility of customizing the site according to your needs.
You can help the projects by contributing to the source code,
by giving me a donation or simply by subscribing to our
supporting hosting plan