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"
        }
    }
}

install

npm i unamd

Downloadsweekly downloads

1

version

1.0.3

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability