# ragu-simple-adapter

> A simple adapter for Ragu

Latest version **0.0.16** (published 2021-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install ragu-simple-adapter
pnpm add ragu-simple-adapter
yarn add ragu-simple-adapter
bun add ragu-simple-adapter
```

## 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.0.16 |
| Published | 2021-03-30 |
| First published | 2021-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maniero |
| Maintainers | carlosmaniero |

## Links

- npm: https://www.npmjs.com/package/ragu-simple-adapter
- Repository: https://github.com/ragu-framework/ragu-simple-adapter
- Homepage: https://github.com/ragu-framework/ragu-simple-adapter#readme
- Issues: https://github.com/ragu-framework/ragu-simple-adapter/issues
- npm.io page: https://npm.io/package/ragu-simple-adapter

## Recent versions

- 0.0.16 (latest) — 2021-03-30
- 0.0.14 — 2021-03-29
- 0.0.13 — 2021-03-26
- 0.0.12 — 2021-03-26
- 0.0.11 — 2021-03-26
- 0.0.10 — 2021-03-26
- 0.0.9 — 2021-03-06
- 0.0.8 — 2021-03-05
- 0.0.7 — 2021-03-05
- 0.0.6 — 2021-03-05
- 0.0.5 — 2021-03-05
- 0.0.4 — 2021-03-05
- 0.0.3 — 2021-03-05
- 0.0.2 — 2021-03-05
- 0.0.1 — 2021-03-04

## README

<p align="center" style="color: #343a40">
  <p align="center" >
    <img src="repository-assets/banner.png" alt="Ragu" align="center" style="max-width: 100%">
  </p>
  <h1 align="center">Ragu Simple Adapter</h1>
</p>

![Testing](https://github.com/ragu-framework/ragu-simple-adapter/workflows/Testing/badge.svg)
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
![npm version](https://badge.fury.io/js/ragu-simple-adapter.svg)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)

A simple adapter for [Ragu Server - A micro-frontend framework](https://ragu-framework.github.io).

## Installation

```shell script
yarn add webpack ragu-cli ragu-simple-adapter
```

## Exposing a Component

Create a file that renders your component:

```javascript
// my-mfe.js
module.exports = () => ({
  html: 'Hello, World'
})
```

After, start the ragu server specifying your adapter:

```shell script
yarn ragu-cli dev --file my-mfe.js --adapter simple
```

Open your browser at http://localhost:3100/preview to check your micro-frontend live!

That's all!


## Build to production

```shell script
yarn ragu-cli static --file my-mfe.js --baseurl https://mycdnhost/mymfe --output production --adapter simple
```

It will create a directory called `production` with a file called `index.json`.

### Using your component

```html
<head>
  <script src="https://cdn.jsdelivr.net/npm/ragu-dom@latest/ragu-dom.js" crossorigin="anonymous"></script>
  <script>RaguDOM.registerRaguComponent();</script>
</head>

<body>
  <ragu-framework src="https://mycdnhost/mymfe/index.json"></ragu-framework>
</body>
```

Check The docs for More: https://ragu-framework.github.io/#!/ragu-simple-adapter

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