Options
All
  • Public
  • Public/Protected
  • All
Menu

ink-router-cli - v2.0.1

INK-ROUTER-CLI

Installation

ink-router-cli runs with ink and is avaiable as a NPM package.

npm install --save ink-router-cli

Usage

ink-router-cli was heavily influenced by react-router, so most of the concepts are similiar with react-route.

import {Router, Switch, Command} from 'ink-router-cli';
import {render, Text} from 'ink';

const App = () => {

    return <Router argv={process.argv}>
        <Switch>
            <Command name="create" component={<Text>Create Command</Text>}  />
        </Switch>
    </Router>
}

render(<App />)

Generated using TypeDoc