qw-components-lib v0.0.2
QW-COMPONENTS-LIB
QW design system consists on a library of QWIK components that implements a common design for applications.
QW-DESIGN-SYSTEM-LIB STACK ⚡️
Usage
npm npm i qw-components-libIn your poject page.tsx
import { QwButton } from 'qw-components-lib';
<QwButton>My button</QwButton>;Collaborations
Project Structure
Inside your project, you'll see the following directories and files:
├── public/
│ └── ...
└── src/
├── components/
│ └── qw-button
│ |── stories
| | └── ..
│ |── test
| | └── ..
| |── qw-button.tsx
| |── qw-button.scss
| └── _hooks.scss
└── index.tssrc/components: Recommended directory for components.src/components/[component-name]/stories: Recommended directory for stories.src/components/[component-name]/test: Recommended directory for test.index.ts: The entry point of your component library, make sure all the public components are exported from this file.
Download
git clone https://github.com/javigonzmoya/qw-components-lib.gitgit checkout release-x-x-xgit checkout -b feat/example-...yarn installDevelopment
Development mode uses Vite's development server. For Qwik during development, the dev command will also server-side render (SSR) the output. The client-side development modules are loaded by the browser.
yarn devNote: during dev mode, Vite will request many JS files, which does not represent a Qwik production build.
Build
The production build should generate the production build of your component library in (./lib) and the typescript type definitions in (./lib-types).
yarn buildTesting
Run the simple unit tests.
yarn test:unitRun the ui enviroment unit tests.
yarn test:unit:uiRun the coverage.
yarn test:coverageStorybook
The storybook should run.
yarn storybookAnd start local server.
http://localhost:6006/