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.
- Host: GitHub
- URL: https://github.com/ecmel/refable-light
- Owner: ecmel
- License: mit
- Created: 2023-03-14T12:28:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T08:10:05.000Z (about 2 years ago)
- Last Synced: 2025-01-17T07:45:01.068Z (about 1 year ago)
- Topics: framework, npm-package
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/refable-light
- Size: 68.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
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 {
//
}
```