This is the home of the front-end component library we built to support our product at Netbase.
Live demo and detail documentations for each components please see ui.netbase.com.
This repository contains a list of node packages (located under packges/<pkg_name>
) each hosts different parts of our UI components which can be installed/published individually depending on your usage.
Currently, all the packages is scoped under @netbase-ui
namespace, hence you can install the package you need by:
Detailed instructions can be found in the README.md of each package folder and additional documentation can be found in ui.netbase.com.
First, install all the dependencies by running:
Second, use lerna bootstrap to install all of the dependencies and links any cross-dependencies for the packages:
And you can test your newly added components in stroybook:
Finally, you can document your components in the styleguidist. To start the styleguidist dev environmnent:
Using leran create to add new packages:
Using lerna add to manage package dependencies:
Configure your package.json
, make sure it contains the following fields:
<package_A>
depends on <package_B>
(eg. @netbase-ui/wordCloud
depends on @netbase-ui/theme
).<package_B>
(instead of the built files) in order to have the code change be seen at hot reload.src
as prioritized field in Styleguidist webpack config.If you've added any thirdparty dependencies, please make sure to add them into external list in builder.js
Currently, there're two kinds of branches in the repo:
main
: Used to publish official versions.feature/*
: Used to publish testing versions.Note: feature branch name is required to start with feature/*
otherwise the build/publish process will fail.
Here is the recommended workflow:
main
branch.main
and jenkins will then pick up the changes from your branch and start building & publishing testing version of those packages under version: <version>-PR-<pr_nubmer>-<test_version>
.main
, make sure you:
main
into feature/*
and resolve conflicts by choosing the newer versions in package.json
and all the changes you want.main
on github.