# rollup-plugin-archieml

> Import ArchieML files using Rollup

Latest version **1.2.1** (published 2023-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-archieml
pnpm add rollup-plugin-archieml
yarn add rollup-plugin-archieml
bun add rollup-plugin-archieml
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2023-01-24 |
| First published | 2021-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Paul Murray |
| Maintainers | plmrry |
| Keywords | archieml, rollup |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-archieml
- Repository: https://github.com/plmrry/rollup-plugin-archieml
- Homepage: https://github.com/plmrry/rollup-plugin-archieml#readme
- Issues: https://github.com/plmrry/rollup-plugin-archieml/issues
- npm.io page: https://npm.io/package/rollup-plugin-archieml

## Dependencies (2)

- [archieml](https://npm.io/package/archieml.md) 0.5.0
- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) latest

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2023-01-24
- 1.1.2 — 2022-08-22
- 1.1.1 — 2022-08-03
- 1.0.14 — 2021-08-07
- 1.0.13 — 2021-08-06
- 1.0.12 — 2021-08-06
- 1.0.11 — 2021-08-06
- 1.0.8 — 2021-08-06
- 1.0.7 — 2021-08-06
- 1.0.5 — 2021-08-06
- 1.0.4 — 2021-08-06
- 1.0.3 — 2021-08-06
- 1.0.1 — 2021-08-06
- 1.0.0 — 2021-08-06

## README

[npm]: https://img.shields.io/npm/v/rollup-plugin-archieml
[npm-url]: https://www.npmjs.com/package/rollup-plugin-archieml
[size]: https://packagephobia.now.sh/badge?p=rollup-plugin-archieml
[size-url]: https://packagephobia.now.sh/result?p=rollup-plugin-archieml

[![npm][npm]][npm-url]
[![size][size]][size-url]

# rollup-plugin-archieml

A Rollup plugin which converts [ArchieML](http://archieml.org/) files into JavaScript modules.

## Install

```console
npm install rollup-plugin-archieml --save-dev
```

## Usage

Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:

```js
import archieml from "rollup-plugin-archieml";

export default {
  input: "src/index.js",
  output: {
    dir: "output",
    format: "cjs",
  },
  plugins: [archieml()],
};
```

Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).

## Example

Given an ArchieML file called `events.aml`:

```
[+events]
  header: My Birthday
  date: August 20th, 1990

  Here's a nice photo

  {.image}
    src: http://example.com/photo.png
    alt: Family Photo
    [.members]
      * Dad
      * Mom
      * Me
    []
  {}
[]
```

Using this plugin, we can `import` (or `require`) the ArchieML file directly:

```js
import events from "./events.aml";

console.dir(events, { depth: null });
// {
//   events: [
//     { type: 'header', value: 'My Birthday' },
//     { type: 'date', value: 'August 20th, 1990' },
//     { type: 'text', value: "Here's a nice photo" },
//     {
//       type: 'image',
//       value: {
//         src: 'http://example.com/photo.png',
//         alt: 'Family Photo',
//         members: [ 'Dad', 'Mom', 'Me' ]
//       }
//     }
//   ]
// }
```

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