Awesome webcomponents as a designsystem extension for the Bricks & Braces brand.
At first, install the dependencies:
yarn add @openbricksandbraces/webcomponents
Then, import the styles from your main / application component (App.tsx on create-react-app):
import React from 'react';
import "@openbricksandbraces/designsystem/lib/styles/dist/index.css"
// import right below the designsystem styles
import "@openbricksandbraces/webcomponents/lib/styles/dist/index.css"
import './App.css';
...
Instead of importing already processed styles you could also import
import "@openbricksandbraces/designsystem/lib/styles/postcss/index.css";
// import right below the designsystem styles
import "@openbricksandbraces/webcomponents/lib/styles/postcss/index.css";
for easy customisation reasons. Please note, that you need a postcss-loader for this. Make yourself common with the configuration by looking at the designsystem repo.
Last but not least, use a webcomponent from the library:
...
import { Leadspace } from "@openbricksandbraces/webcomponents"
function App() {
// see the designystem repo for why you need to initialize it via javascript.
useInitialize();
return (
...
<Leadspace />
...
);
}
Aaaand you are done!
- Typescript
- React
- PostCSS
- Storybook
- Prettier, ESlint, Stylelint
- Husky
- Jest, Enzyme
At first, install husky using yarn husky install
.
To start storybook and show all components, simply run:
yarn storybook
yarn test
yarn format:check
yarn format:fix
yarn build:package
yarn build:storybook
yarn start:storybook
Disclaimer: Because we are using yarn berry options from .yarnrc and .npmrc will be IGNORED. Please look into the offical documentation for the new file structure.
- Insert
yarn npm login --publish
and authenticate using the npm account of openbricksandbraces. - Make sure you've installed the dependencies and built the package
yarn && yarn build:package
. - Using
yarn npm publish --tag latest
you will be able to publish a new version of the package! 🎉
Bricks & Braces Internal Property. No License given.