@sierralabs/site-ui
v1.1.50
Published
Sierra Labs Site Builder React UI Library
Downloads
3,189
Readme
Sierra Labs Site UI
Sierra Labs Site Builder React UI Library.
Getting Started
Install the @sierralabs/site-ui
package along with peer dependencies
# for npm
$ npm install @sierralabs/core @sierralabs/track-changes @sierralabs/state-machine @sierralabs/core-ui @sierralabs/site-core @sierralabs/site-ui
# or for yarn
$ yarn add @sierralabs/core @sierralabs/track-changes @sierralabs/state-machine @sierralabs/core-ui @sierralabs/site-core @sierralabs/site-ui
Development & Contributing
For fast development leveraging React's fast refresh capabilities you can develop using the site-ui-example
project located in the "examples" folder.
# Start the @sierralabs/site-ui in watch mode
site-ui $ yarn dev
# Start the site builder example project
site-ui-example $ yarn start
# Now all changes in @sierralabs/site-ui will get automatically compiled and leverage React's fast browser refresh capabilities.
Development from an outside project
To develop and contribute to the @sierralabs/site-ui
project from another project that has a dependency on this module you can use Yalc. Yalc works better then yarn/npm link due to node_module dependency issues with symlinking that impact modules like react.
# Install yalc if you don't already have it installed
$ npm install -g yalc
# Publish `@sierralabs/site-ui` into your local yalc repo
$ yalc publish
# On the project that is using `@sierralabs/site-api` run
dependent-project $ yalc link @sierralabs/site-api
# Now back on the `@sierralabs/site-ui` folder you can make code changes and push changes to the linked projects by
$ yalc push
# Lastly, to undo the yalc link reference, you'll need to force the package install on the dependent project
dependent-project $ yarn install --force