Get unlimited public & private packages + team-based management with npm Teams.Learn more »

rollup-emscripten

0.2.0 • Public • Published

rollup-emscripten

Uses rollup to bundle multiple modules then converts the ouput to the Emscripten library format.

Examples

import rollupEmscripten from 'rollup-emscripten';
 
rollupEmscripten({
    entry: './my-lib.js',
    localPrefix: 'myLib', // prefix for local symbols
    // ...other rollup options
}).then(result => result.write('output.js'));

with babel:

import rollupEmscripten from 'rollup-emscripten';
import rollupBabel from 'rollup-plugin-babel';
 
rollupEmscripten({
    entry: './my-lib.js',
    localPrefix: 'myLib', // prefix for local symbols
    plugins: [
        rollupBabel({
            babelrc: false,
            presets: [
                ['es2015', {modules: false}],
            ],
        }),
    ]
}).then(result => result.write('output.js'));

Keywords

none

Install

npm i rollup-emscripten

DownloadsWeekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • avatar