To Getting started
after having downloaded the repository, these are the steps you have to follow to make the repository work for the first time:
-npm i -D @babel/cli @babel/core @babel/preset-env @babel/preset-react rollup @rollup/plugin-babel rollup-plugin-delete rollup-plugin-peer-deps-external npm-run-all.
-npm run i-all.
-npm update && npm run build.
-npm run dev.
General Scripts
The commands will be executed from the ROOT folder of the repository.
-
npm run i-all
this script installing all the dependencies, for both folders, library and playground (optional if the dependencies of the library or the playground have not yet been installed).
-
npm update && npm run build
... these commands work to update and create the build (the ./dist folder) of the library, which is necessary to test it in the playground. (The components will not work or display unless you update the ./dist folder with this command).
-
npm run dev
... this command is responsible for raising the code from the playground and the library, so the components can be edited (within the library) and automatically updated in the front (the playground). This command is the most useful to develop, because it updates the .dist folder when it is being developed,so I suggest you use more than all of this.
--The components in the library are different than the components in the playground, they should not be confused.
--The components in the playground must be built with proptypes so that they are able to render a correct documentation.
Additional features
-
npm run start-playground
this command will only raise the "playground" to test the components (this command will not update the library when any component is changed there).
-
npm run start-library
this command will only run the "documentation". to see the documentation running go to localhost:6060