quantum_components
v1.1.235
Published
Quantum components library based on AntD
Downloads
24
Readme
quantum_co52mponents
Made with create-react-library
Install
npm install --save quantum_components
Usage
import React, { Component } from 'react'
import MyComponent from 'quantum_components'
class Example extends Component {
render() {
return <MyComponent />
}
}
Development
Building
npm run build
Package development flow
- crate new branch from master for your feature
- finish your task and don't forget import new component to
src/index.ts
- run
npm run build
for error checking - create MR for master branch
- after changes will be merged - publish new package version from master branch
- for publishing - ask credentials from PM or TL (for login - use the console)
- update latest package version only for minor changes (example:
"version": "1.0.1"
->"version": "1.0.2"
) - after publishing (
npm publish
) don't forget to commit newpackage.json
changes to master - update new package version at your project
npm update quantum_components
and check changes
Link for checking package version https://www.npmjs.com/~quantum-codemotion
Storybook
To run a live-reload Storybook server on your local machine:
npm run storybook
You can then serve the files under storybook-static
using S3, GitHub pages, Express etc.
Generating New Components
I've included a handy NodeJS util file under util
called create-component.js
. Instead of copy pasting components to create a new component, you can instead run this command to generate all the files you need to start building out a new component. To use it:
npm run generate YourComponentName
This will generate:
/src/components
/YourComponentName
YourComponentName.tsx
YourComponentName.stories.tsx
YourComponentName.scss
The default templates for each file can be modified under util/templates
.
Don't forget to add the component to your index.ts
exports if you want the library to export the component!
License
MIT © Mansur Mabo