# component-amd

> Component builder plugin that transforms AMD to CommonJS.

Latest version **0.1.0** (published 2013-06-19) · 0 weekly downloads

## Install

```sh
npm install component-amd
pnpm add component-amd
yarn add component-amd
bun add component-amd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-06-19 |
| First published | 2013-06-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jared Hanson |
| Maintainers | jaredhanson |
| Keywords | component, builder, requirejs, amd |

## Links

- npm: https://www.npmjs.com/package/component-amd
- Repository: https://github.com/jaredhanson/component-amd
- Issues: http://github.com/jaredhanson/component-amd/issues
- npm.io page: https://npm.io/package/component-amd

## Dependencies (4)

- [batch](https://npm.io/package/batch.md) 0.4.x
- [esprima](https://npm.io/package/esprima.md) 1.x.x
- [escodegen](https://npm.io/package/escodegen.md) 0.0.x
- [estraverse](https://npm.io/package/estraverse.md) 1.x.x

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2013-06-19

## README

# component-amd

[Component](https://github.com/component) [builder](https://github.com/component/builder.js)
plugin that transpiles [AMD](https://github.com/amdjs/amdjs-api) modules into
[CommonJS](http://www.commonjs.org/) modules which can be included in component
builds.

With this plugin in use, CommonJS and AMD modules can be freely intermixed
within the component toolchain.

## Install

    $ npm install component-amd

## Usage

#### Command Line

Build the component, including AMD modules, by invoking `component build`
with `component-amd` in use.

    component build -u component-amd

#### API

```javascript
var fs      = require('fs')
  , Builder = require('component-builder')
  , amd     = require('component-amd');

var builder = new Builder(__dirname);

builder.use(amd);

builder.build(function(err, obj) {
  if (err) throw err;
  fs.writeFileSync('build/build.js', obj.require + obj.js);
  if (obj.css) fs.writeFileSync('build/build.css', obj.css);
});
```

## Tests

    $ npm install
    $ make test

[![Build Status](https://secure.travis-ci.org/jaredhanson/component-amd.png)](http://travis-ci.org/jaredhanson/component-amd)  [![David DM](https://david-dm.org/jaredhanson/component-amd.png)](http://david-dm.org/jaredhanson/component-amd)

## Credits

  - [Jared Hanson](http://github.com/jaredhanson)

## License

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>

---
_Source: https://npm.io/package/component-amd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
