README
ARGO UIKit
Reusable UI components for Argo.
Development
Local
Both local development and building for publishing write to the dist folder. We use npm link
for local development and avoid adding it to package.json
.
npm run watch
will point to the consuming projects react libs in the global node folder. If you get an error about multiple versions of react, chances are something went wrong here.
Consuming project folder eg. platform-ui
:
- run
npm link
from bothreact
andreact-dom
node_modules.
UIKit lib:
- Install dependencies:
npm i
- Start watching:
npm run watch
NB: npm link
installs to global node folder. be careful when using something like NVM which creates different global folders for different node versions. Both uikit
and the consuming project will need to be using the same node version.
Storybook
npm run storybook
for starting the storybook on port 6006 for isolated component development.npm run build-storybook
creates static storybook build in./storybook-static
Component Boilerplate
- creating a new component:
npm run create-component
Writing commits
To keep commit messages consistent, we use gitmoji-cli, available as a dev dependency
npm run commit
will start interactive commit tool- configuring gitmoji-cli:
npm run gitmoji-config
Type checking
npm run type-check
: trigger TypeScript type check for whole reponpm run type-check -- --watch
: runs the above with watch mode- Any
npm run type-check
triggerstsc
, so any flag layed out here can be used
- Any
- If using vscode (recommended),
tsc
can also be run as a task in the editor:Cmd+Shift+B
, then selecttsc:build - tsconfig.json
- This will report errors in vscode's
PROBLEMS
tab
Publish to npm:
- Increase
version
underuikit/package.release.json
Automated process (recommended)
- Merge that change to
develop
, and let the Jenkins pipeline handle it
- Merge that change to
Manual process (discouraged, but available)
- Run
npm run build-uikit
which performs the following: - Run
npm run publish-uikit
to publish latest version to npm
- Run