ras-library-test
v0.0.2
Published
Made with create-react-library
Downloads
1
Readme
ras-library
Made with create-react-library
Install
yarn install ras-library
Development
Local development is broken into two parts (ideally using two tabs).
First, run rollup to watch your src/
module and automatically recompile it into dist/
whenever you make changes.
yarn start
The second part will be running the example/
create-react-app that's linked to the local version of your module.
# (in another tab)
cd example
yarn start
Now, anytime you make a change to your library in src/
or to the example app's example/src
, create-react-app
will live-reload your local dev server so you can iterate on your component in real-time.
DocZ
yarn docz dev
Usage
import React from "react"
import { MyComponent } from "ras-library"
import "ras-library/dist/index.css"
const ExampleView = () => {
return <MyComponent />
}
Warning
- --jsxFragment React.Fragment is added at the end of scripts start & build to avoid error when component use React.Fragment shortcut
ReferenceError: Fragment is not defined
- Be careful with package
webpack-dev-server
, create-react-library and Docz have conflict on that on install. the build of "examples" folder may crash after install new packages.
License
MIT © test