gobble-amdclean

0.1.0 • Public • Published

gobble-amdclean

Convert AMD code to standard JavaScript with gobble and AMDClean.

Installation

First, you need to have gobble installed - see the gobble readme for details. Then,

npm i -D gobble-amdclean

Usage

gobblefile.js

var gobble = require( 'gobble' );
module.exports = gobble( 'requirejs-output' ).map( 'amdclean', amdCleanOptions );

The AMDClean options are as per the documentation (the code property will be overwritten by gobble).

Source code

module.exports = amdclean;

function amdclean ( code, options ) {
  options.code = code;
  return require( 'amdclean' ).clean( options );
}

amdclean.defaults = {
  accept: '.js'
};

License

MIT. Copyright 2014 Rich Harris

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i gobble-amdclean

    Weekly Downloads

    0

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • rich_harris