@leverage-js/ui v0.0.11
UI
Development
Package
dev/npm install
dev/npm run watchdev/npm run watch builds the package every time you update any component.
And it copies dist/* to demo/node_modules/@leverage-js/ui to make demo
always have the current ui.
Demo
cd demo
dev/npm install
dev/npm run publish-ui-assets
dev/npm run servedev/npm run serve launches the dev web server with hot module reload. Demo file
updates are instant, while ui updates may take a couple of seconds for a full
dev server restart.
Latest demo is deployed on ui.architechlabs.com (test server):
deploy ui.architechlabs.comExport components
index.js contains all the exports. You put any new components or
component renames here.
Publishing
Version increment
Three commands for three kinds of increment:
npm version patch0.0.1 -> 0.0.2npm version minor0.0.1 -> 0.1.0npm version major0.0.1 -> 1.0.0
It creates a git tag as well. dev/npm fails to create a git tag in my env.
Build
dev/npm run buildFor some reason, npm package publishing doesn't work with Docker npm. Until we have a fix, you'd publish with local npm:
npm publishInstallation
npm install @leverage-js/uidemo directory has a reference app.
Notice the publish-ui-assets
npm command that copies the ui assets to web/ui. You need a similar
command for your app because some components expect their assets to be available
in /ui from a web root.
For sane ui error messages in app, you need a dev ui build:
dev/npm run build:devThen copy dist/index.js to node_modules/@leverage-js/ui/dist in app
and rebuild it. ui error messages should be fine now.