eo-components v0.0.19-rc.1
Example
Todo:
- We should deploy storybook on webdev
Development
This library uses npm
, and not yarn
, so please use npm
!
To start storybook, run the following in the terminal npm run storybook
. Note that this does not build the library.
To build the library you can run npm run build
or npm run start
, the difference is that npm run start
will build on file changes.
Adding packages
We should use as little external packages as possible, but if we need to add a package please add it to dependencies
. Packages like prettier
, eslint
and typescript
for example should be added to devDependecies
.
If adding a package to peerDependecies
please make sure it deserves to be there.
One can read more at the following link Understanding the npm dependency model.
In short, if react
and react-dom
are peerDependecies
, then the project/application must have react
and react-dom
in its package.json
. Packages in peerDependecies
will not be installed by the library, but should be installed by the application/project that consumes this library.
Bundling
This project uses rollup for bundling.
Rollup should treat external packages as external, and not bundle them with our library.
This is achieved by the following in rollup.config.js
`external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],`
Deployment
Currently we are not publishing to npm
, and are using gitlab
with the use of tags. For this reason it is important to run npm run build
before committing.
4 years ago