UI components (React), theme (based on Bootstrap) and styleguide (Storybook) for Borrow app.
- React 17
- Bootstrap 5
- Storybook 7
- Webpack 5
- Babel
- Prettier
- ESLint
dist/borrow-ui.js
: Component librarydist/borrow-ui.css
: Theme (styles)dist/**.woff
,dist/**.woff2
: Fonts
Modes of development:
- Start Storybook (
npm run storybook
) - Start UI library in watch mode (
npm run watch
), then startleihs-my
app (../bin/cljs-watch
)
Changes in components will automatically reflect inleihs-my
app. Changes in SCSS require a browser reload. - (or both together)
Note that Storybook has its own build chain and is not affected by webpack.config.js
.
If there is a problem with the library build while everything is fine in Storybook: use test-app
to debug in a standalone/runnable environment (see below).
npm run storybook
: Start storybook (http://localhost:6006)npm run build-storybook
: Build deployable (goes tostorybook-static
folder)
Note that currently only Prettier's rule definitions are configured in ESLint.
npm run lint
: Lint all filesnpm run prettier
: Autoformat all files
npm run watch
: Start theme and lib in watch/dev mode (use along with watch mode in Borrow app)npm run build
: Build theme and lib for productionnpm run start
: Start dev server fortest-app
(http://localhost:8081/test-app.html). Enabletest-app
inwebpack.config.js
for this to work