⚠️ PLEASE READ THE INSTRUCTIONS FOR GUIDELINES ON HOW TO START YOUR PACKAGE.
Don't forget to remove this warning while updating this README.
{package-description}
$ npm install @moxy/{package-name}This library is written in modern JavaScript and is published in both CommonJS and ES module transpiled variants. If you target older browsers please make sure to transpile accordingly.
{package-motivation}
{package-usage-example}
{package-api-description}
Type: object
Required: true
The {package-api-prop-example} has the following shape:
{package-api-prop-example}: PropTypes.shape({
foo: PropTypes.string,
bar: PropTypes.arrayOf(PropTypes.object),
}).isRequired,$ npm test
$ npm test -- --watch # during developmentA demo Next.js project is available in the /demo folder so you can try out this component.
First, build the {package-name} project with:
$ npm run buildNote: Everytime a change is made to the package a rebuild is required to reflect those changes on the demo. While developing, it may be a good idea to run the dev script, so you won't need to manually run the build after every change
$ npm run devTo run the demo, do the following inside the demo's folder:
$ npm i
$ npm run devThere is an ongoing next.js issue about the loading order of modules and global CSS in development mode. This has been fixed in v9.3.6-canary.0, so you can either update next.js to a version higher than v9.3.5, or simply increase the CSS specificity when overriding component's classes, as we did in the demo, e.g. having the page or section CSS wrap the component's one.
Released under the MIT License.