An open API service indexing awesome lists of open source software.

https://github.com/ecmel/refable-light

Lighter version of Refable.
https://github.com/ecmel/refable-light

framework npm-package

Last synced: 4 months ago
JSON representation

Lighter version of Refable.

Awesome Lists containing this project

README

          

# Refable Light

Lighter version of [Refable](https://github.com/ecmel/refable)

## Installation

```bash
npm install refable-light --save-dev
```

## Application

Application is the main class for bootstrapping. Controllers are registered on an application instance. For registering glob of controllers please refer to your bundler's documentation.

```ts
import { Application } from "refable-light";
import Search from "./controllers/search";

const application = new Application();

application.register("search", Search);

application.run();
```

## Controllers

Controllers are instances of classes that you register in your application. Each controller class inherits from the Controller base class.

```html


```

```ts
import { Controller } from "refable-light";

export default class extends Controller {
created() {
//
}

connected() {
//
}

disconnected() {
//
}
}
```

Controller classes are templated so more specific elements can be used if needed.

```ts
import { Controller } from "refable-light";

export default class extends Controller {
//
}
```