0.0.16 • Published 3 years ago

ragu-simple-adapter v0.0.16

Weekly downloads
58
License
MIT
Repository
github
Last release
3 years ago

Testing License: MIT npm version PRs Welcome

A simple adapter for Ragu Server - A micro-frontend framework.

Installation

yarn add webpack ragu-cli ragu-simple-adapter

Exposing a Component

Create a file that renders your component:

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

After, start the ragu server specifying your adapter:

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

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

<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

0.0.14

3 years ago

0.0.16

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago