Skip to content

Latest commit

 

History

History
125 lines (81 loc) · 2.73 KB

README.md

File metadata and controls

125 lines (81 loc) · 2.73 KB

UI Developer Setup

UI module for the calendar-events-zome.

Requirements

Local Demo with @web/dev-server

First, build the holochain dna.

Run this from inside the nix-shell in which you have the holochain binary install.

npm start

This will serve a local development server that serves the basic demo located in demo/index.html at localhost:8080/demo. Take into account that this will run the holochain conductor in the background and connect the UI to the actual conductor.

Running only the UI

npm run start-ui

Building

npm run build

Testing with @web/test-runner

To run the suite of karma tests, run

npm run test

To run the tests in watch mode (for TDD, for example), run two terminals:

In the first terminal:

npm run build-watch

In the second terminal:

npm run test-watch

E2E tests

First, build the holochain dna. Run this from inside the nix-shell in which you have the holochain binary install.

npm run e2e

Take into account that this will run the holochain conductor in the background to perform the tests.

Demoing with Storybook

To run a local instance of Storybook for your component, run

npm run storybook

To build a production version of Storybook, run

npm run build-storybook

Linting with ESLint

To scan the project for linting errors, run

npm run lint

To automatically fix many linting errors, run

npm run format

Publishing to npm

npm run publish-npm

This will build the application, copy the README.md, LICENSE and package.json to the dist folder and publish that.

Publishing storybook documentation to Github Pages

npm run publish-storybook

This will build the static storybook site, and deploy it directly in the gh-pages of your repository.

After this, it will be accessible in the appropriate Github Pages URL (eg. https://holochain-open-dev.github.io/calendar-events-module).

Publishing in a branch on this repository

If you don't want to publish to NPM yet, you can "publish" a build of this module with:

npm run publish-to-branch

Now, a built version of this module will be at the root of the ui-build branch, which other package.json files can reference like this:

  "dependencies": {
    "@holochain-open-dev/TODO_RENAME_MODULE": "holochain-open-dev/TODO_RENAME_MODULE#ui-build",
  }