# @rosmarinus/compiler-kit

> compiler kit for rosmarinus projects

Latest version **0.2.2** (published 2024-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rosmarinus/compiler-kit
pnpm add @rosmarinus/compiler-kit
yarn add @rosmarinus/compiler-kit
bun add @rosmarinus/compiler-kit
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; large bundle; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2024-05-26 |
| First published | 2023-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 13 |
| Unpacked size | 10.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | rosmarinus |
| Keywords | compiler, rosmarinus |

## Links

- npm: https://www.npmjs.com/package/@rosmarinus/compiler-kit
- Repository: https://github.com/rosmarinus-project/rosmarinus-universal
- Homepage: https://github.com/rosmarinus-project/rosmarinus-universal#readme
- Issues: https://github.com/rosmarinus-project/rosmarinus-universal/issues
- npm.io page: https://npm.io/package/@rosmarinus/compiler-kit

## Dependencies (13)

- [json5](https://npm.io/package/json5.md) ^2.2.3
- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [domhandler](https://npm.io/package/domhandler.md) ^5.0.3
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.22.5
- [htmlparser2](https://npm.io/package/htmlparser2.md) ^9.0.0
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.23.3
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.23.3
- [dom-serializer](https://npm.io/package/dom-serializer.md) ^2.0.0
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.23.3
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.23.3
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.23.3
- [@babel/plugin-transform-typescript](https://npm.io/package/@babel/plugin-transform-typescript.md) ^7.23.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.2.2 (latest) — 2024-05-26
- 0.2.1 — 2023-11-13
- 0.2.0 — 2023-11-10
- 0.1.2 — 2023-11-10
- 0.1.1 — 2023-11-10

## README

# @rosmarinus/compiler-kit

<p align="center">
  <a href="https://www.npmjs.com/package/@rosmarinus/compiler-kit"><img src="https://img.shields.io/npm/v/@rosmarinus/compiler-kit" alt="npm package"></a>
  <a href="https://github.com/rosmarinus-project/rosmarinus-universal/actions/workflows/publish.yml"><img src="https://github.com/rosmarinus-project/rosmarinus-universal/actions/workflows/publish.yml/badge.svg" alt="build status"></a>
  <a href="https://pr.new/rosmarinus-project/rosmarinus-universal"><img src="https://developer.stackblitz.com/img/start_pr_dark_small.svg" alt="Start new PR in StackBlitz Codeflow"></a>
</p>

This is a compiler utils in babel and htmlparser2.

## Installation
```sh
npm install @rosmarinus/compiler-kit
```

## Usage

### ES
```typescript
import { esCompiler } from '@rosmarinus/compiler-kit';
const ast = esCompiler.parse('const a = 1;');

esCompiler.walker(ast, {
  // babel traverse
});

const codeGen = esCompiler.builder(ast);
```

### HTML
```typescript
import { htmlCompiler } from '@rosmarinus/compiler-kit';
const ast = htmlCompiler.parse('<div>hello world</div>');

htmlCompiler.walker(ast, {
  // htmlparser2 traverse
});

const codeGen = htmlCompiler.builder(ast);
```

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