inlineify
v0.0.3
Published
Inline code from external (source) files.
Downloads
3
Maintainers
Readme
inlineify
Inline code from external (source) files.
Usage
Install the package via npm:
npm i inlineify
Add it as a browserify transform (also works with watchify):
browserify -t inlineify example/index.js
Write your code (See /example
directory):
// "Putting It All Together" example from the asm.js spec
// http://asmjs.org/spec/latest/
var inlineify = require('inlineify');
function GeometricMean(stdlib, foreign, buffer) {
'use asm';
inlineify('./geometricMean');
inlineify('./init');
inlineify('./logSum');
return { geometricMean: geometricMean };
}
Why
Hand-writing asm.js modules really isn't fun when you can't split up your code into multiple files.