Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 3 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,6 @@ It is designed to work alongside:

Rebase only owns syntax that the active Rebase instance explicitly registers. Host-framework syntax is left alone.

## Installation

### Package

```bash
npm install rebase
```

Then:

```js
import { createRebase } from "rebase";

const rebase = createRebase();

rebase.directive("hello", ({ expression }) =>
`<strong>Hello ${expression}</strong>`
);
```

### Core package

For library authors and integrations:

```bash
npm install @rebase/core
```

### Documentation

Full documentation and API reference:

**https://js-rebase.github.io**

## Syntax

Rebase has three extension points:
Expand All @@ -83,37 +49,10 @@ Example:

## Plugins

A plugin is just a normal JavaScript package.

```js
export default {
name: "rebase-lucide",

install(rebase) {
rebase.directive("lucide", ({ expression }) => {
// return the generated HTML/SVG
});
}
};
```

Users install plugins separately:
A plugin is a normal JavaScript module that registers its capabilities with Rebase.

```bash
npm install rebase rebase-lucide
```

and enable them explicitly:

```js
import { createRebase } from "rebase";
import lucide from "rebase-lucide";

const rebase = createRebase();
rebase.use(lucide);
```
This means a plugin cannot silently change a user's Rebase instance merely by being available in the project.

This means a plugin cannot silently change a user's Rebase instance merely by existing in `node_modules`.

## Framework compatibility

Expand Down Expand Up @@ -187,12 +126,11 @@ Plugin handlers receive a context containing:
Requirements:

- Node.js 20+
- npm

Run the test suite:

```bash
npm test
node --test packages/core/test/*.test.js
```

## Status
Expand Down
Loading