# @elemnt/cem-plugin-angular

> [@custom-elements-manifest/analyzer](https://github.com/open-wc/custom-elements-manifest) plugin to automatically create Angular wrappers for your custom elements based on your custom elements manifest. ## Usage

Latest version **0.1.7** (published 2023-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @elemnt/cem-plugin-angular
pnpm add @elemnt/cem-plugin-angular
yarn add @elemnt/cem-plugin-angular
bun add @elemnt/cem-plugin-angular
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2023-03-06 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | chihab |

## Links

- npm: https://www.npmjs.com/package/@elemnt/cem-plugin-angular
- npm.io page: https://npm.io/package/@elemnt/cem-plugin-angular

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) ^2.1.4

## Recent versions

- 0.1.7 (latest) — 2023-03-06
- 0.1.0 — 2023-02-21

## README

# @elemnt/cem-plugin-angular (WIP)

[@custom-elements-manifest/analyzer](https://github.com/open-wc/custom-elements-manifest) plugin to automatically create Angular wrappers for your custom elements based on your custom elements manifest.
## Usage

### Install:

```bash
npm i -D @elemnt/cem-plugin-angular
```

### Import

`custom-elements-manifest.config.js`:
```js
import angular  from 'cem-plugin-angular';

export default {
  plugins: [
    angular()
  ]
}
```

### Configuration

`custom-elements-manifest.config.js`:
```js
import angular from 'cem-plugin-angular';

export default {
  plugins: [
    angular({
        /** Directory to write the React wrappers to, defaults to `legacy` */
        outDir: './angular',
        /** Array of classNames to exclude */
        exclude: ['MyElement']
        /** Whether to generate a Standalone component for each component, defaults to `true` */
        standalone: true,
        /** Whether to generate a NgModule for each component, defaults to `true` */
        ngModule: false,
        /** which components should be integrated with ngModel. 
         * It lets you set what the target prop is (i.e. value), which event will cause the target prop to change, and more. */
        accessors: [{
            event: "input",
            prop: "value",
            elements: ["ui-text"],
        }],
        /** A mapper to get the custom element import */
        packageMapper: (packageJson, component) => {
            return packageJson.name + `/${component.name.toLowerCase()}.js`
        }
    });
  ]
}
```

---
_Source: https://npm.io/package/@elemnt/cem-plugin-angular · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
