unamd

1.0.3 • Public • Published

unAMD

Transform AMD files to CommonJS format.

Usage

browserify -t unamd source.js -o dest.js

or

browserify -t [unamd --log] source.js -o dest.js

in order to console.log which files are being transformed.

If you want to do further piping, you probably don't want to use the --log option.

Configuration

In package.json, add browserify.unamd["require.conf"] property. It will use that to read the "paths" and "baseUrl".

{
    "name": "your-project",
    "version": "0.0.0",
    "browserify": {
        "unamd": {
            "require.conf": "src/js/require.conf"
        }
    }
}

Just in case, you can configure "baseUrl" for yourself:

{
    "name": "your-project",
    "version": "0.0.0",
    "browserify": {
        "unamd": {
            "require.conf": "src/js/require.conf",
            "baseUrl": "src/js"
        }
    }
}

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i unamd

    Weekly Downloads

    114

    Version

    1.0.3

    License

    none

    Last publish

    Collaborators

    • radubrehar