rollup-plugin-strip-pragma

1.0.0 • Public • Published

A Rollup plugin to strip requirejs build pragmas from your code.

Installation

npm install rollup-plugin-strip-pragma --save-dev

Usage

Given source code with a requirejs build pragma, such as:

Cartesian3.fromSpherical = function(spherical, result) {
    //>>includeStart('debug', pragmas.debug);
    Check.typeOf.object('spherical', spherical);
    //>>includeEnd('debug');
    ...
}

The following rollup usage will produce code with pragmas stripped.

const rollup = require('rollup');
const rollupStripPragma = require('./rollup-plugin-strip-pragma');
const bundle = await rollup.rollup({
    input: 'source.js',
    plugins: [
        rollupStripPragma({
            pragmas: ['debug']
        })
    ]
});

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i rollup-plugin-strip-pragma

    Homepage

    cesiumjs.org

    Weekly Downloads

    409

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    3.22 kB

    Total Files

    3

    Last publish

    Collaborators

    • mramato