Docker compose (docker compose
or docker-compose
, with or without sudo
):
./dc build
./dc up storybook # http://localhost:6006
and
docker-compose run --rm --entrypoint=/usr/local/bin/node graphistry-js ./node_modules/lerna/dist/cli.js run lint
We use Storybook for React, plugged into github pages
See Deploy Storybook to GitHub Pages for a great tutorial:
-
Storybook builds get checked into branch
docs
and hosted at graphistry.github.io/graphistry-js -
For local development:
docker compose build
docker compose up storybook
# http://localhost:6006
# All demos work except uploads
- To mimic gha building:
docker compose build
./tools/storybook.sh
./tools/jsdocs.sh
=>
./docs-build # storybook
./docs-build/jsdocs # jsdocs
Terminal A
cd projects/client-api
npm link @graphistry/client-api
npm run build:esm:min:full:watch
Terminal B
cd projects/client-api-react
npm link @graphistry/client-api-react
npm link @graphistry/client-api
npm run build:rollup-watch
Terminal C
cd projects/cra-test
npm link @graphistry/client-api-react
npm start
Enable buildkit for Docker and docker compose plugin, such as in your .profile
:
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
For convenience, we setup ./dc
to do docker compose
commands this for you, such as ./dc build
docker compose build
docker compose run --rm graphistry-js
or
docker run --rm -it graphistry/graphistry:latest
=>
root@8f18f077e0b6:/opt/graphistry-js#
You can build natively to get per-project binaries (see below), or via docker:
./tools/extract-dist.sh
=> projects/client-api[-react]/dist
This copies from graphistry/graphistry-js:latest
into host project folders
You may want to run docker rm graphistry-js-tmp
if a stale container
apt get install jq
npm install
npm run bootstrap
npm run build
npm run lint
( cd projects/client-api-react && ./node_modules/.bin/start-storybook -p 6006 )
# => http://localhost:6006/
We use package-lock.json
as part of aiding reproducibility
Make sure you have a recent node
and npm
-- we have not containerized these steps yet
To regenerate:
- go to a project or the root level
- run
npm run lock:fix
- check in the updated
package-lock.json
-
Login to npm:
npm login
-
Build from a local checkout of branch with a corresponding PR:
Ex:
./dc build
./tools/extract-dist.sh
-
Ensure git clean (
git status
) + npm auth (npm login
) -
Publish:
lerna version X.Y.Z-alpha.2
lerna publish # if failed: lerna publish from-package
As an even bigger hammer, to update even unchanged dependencies, try lerna publish X.Y.Z --force-publish
- Merge the PR in github
This publishes ghpages
- Most likely, you also want to update version dependencies in:
- pivot-app
- viz-app