8000 kui/docs/dev at 8_0_x · Ramhm/kui · GitHub
[go: up one dir, main page]

Skip to content
  • Latest commit

     

    History

    History
     
     

    dev

    Folders and files

    NameName
    Last commit message
    Last commit date

    parent directory

    ..
     
     
     
     
     
     
     
     
     
     

    README.md

    Kui Developers Guide

    Kui is written in TypeScript, which is a typed variant of JavaScript in fairly wide use now across the JavaScript ecosystem.

    To get started with developing and extending Kui, first clone and build the code, and initiate a webpack watcher:

    git clone git@github.com:IBM/kui.git
    export PATH=$PWD/kui/bin:$PATH
    cd kui && npm ci
    npm run watch

    To verify your watcher, you can launch an electron client via npm run open. You should then be able to issue e.g. filesystem command ssuch as ls, and click on the links in the table. Clicking on a JSON or YAML file should display the contents in an editor in the sidecar.

    Edit-debug Loop

    This project is coded in TypeScript with hot reloaded webpack-dev-server. For the most part, after the TypeScript compilation completes, edits to source code can be automatically incorporated into a running instance of the graphical kui shell. The turnaround time, from edit to use, is usually on the order of a few seconds.

    Local Testing

    To run all tests:

    > npm test

    To filter tests, e.g. to run test suites with 'About command' in their title:

    > TEST_FILTER='About command' npm test

    Building a Distribution

    Kui is an Electron application. Electron is a framework for developing rich client applications, using browser technologies. Electron applications can be built to provide local double-clickable clients on Windows, macOS, and Linux. Browser deployments are also possible, further extending the reach of Kui.

    To pack up a set of platform clients for subsequent distribution, you may leverage several npm targets expressed in the package.json:

    This command will build a macOS tarball, and place it in dist/electron/Kui-darwin-x64.tar.bz2:

    npm run build:electron:mac
    0