GithubHelp home page GithubHelp logo

yehorbk / rtl Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 244 KB

A library that provides bootstrap functionality and process management tools for JavaScript applications

License: MIT License

JavaScript 95.81% TypeScript 4.19%
javascript typescript javascript-library typescript-library library entrypoint main startup-script runtime rtl process interface

rtl's Introduction

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 โ€ข Twitter

rtl's People

Contributors

dependabot[bot] avatar yehorbk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.