Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yehorbk/rtl
A library that provides bootstrap functionality and process management tools for JavaScript applications
https://github.com/yehorbk/rtl
entrypoint interface javascript javascript-library library main process rtl runtime startup-script typescript typescript-library
Last synced: 3 days ago
JSON representation
A library that provides bootstrap functionality and process management tools for JavaScript applications
- Host: GitHub
- URL: https://github.com/yehorbk/rtl
- Owner: yehorbk
- License: mit
- Created: 2020-01-29T12:29:27.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T23:57:22.000Z (almost 3 years ago)
- Last Synced: 2024-10-31T15:24:37.008Z (15 days ago)
- Topics: entrypoint, interface, javascript, javascript-library, library, main, process, rtl, runtime, startup-script, typescript, typescript-library
- Language: JavaScript
- Homepage:
- Size: 238 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Runtime Library
A library that provides bootstrap functionality and process management tools for JavaScript applications.
It allows to extend and `Application` class and implement the `main` function in JavaScript.# NPM Installation
```
$ npm install --save @genericst/rtl
```# GitHub Installation
- Run `npm install` to install dependencies
- Run `npm build` to build .ts files into .js
- Run `npm link` to create a temporary link to library cli
If you have a troubles with that commands try to run with `sudo`.# How to use
## Syntax
```
$ rtl [options]
```## Command Line Arguments
- `-f`: select file
- `-o`: push arguments to application## Run
1. Run with **rtl** (default): `rtl -f demo.js`
2. Run with **node** (custom): `node ./bin/cli.js -f demo.js`## Demo
```
const { Application } = require('./rtl-components');class Demo extends Application {
static main(args) {
const { argv } = process;
console.dir({ argv, args });
}
}module.exports = Demo;
```# Requirements
- Entry class must be extended of `Application`
- Entry class must be exported from the file
- `Main` must be a **static function**
- Only **`use strict`**, **imports/exports**, **global variables** and **classes** allowed in the file# Scripts
- `npm start` - build and run application with rtl
- `npm test` - run tests
- `npm run-script rtl-run` - run application with rtl
- `npm run-script build` - build .ts files into .js
- `npm run-script eslint` - check for syntax mistakes# Author
**Yehor Bublyk**: [GitHub](https://github.com/yehorbk) • [Twitter](https://twitter.com/yehorbk)