1.0.6 • Published 4 years ago

@privy-eng/privy-components v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Privy Component Library:

Setup steps:

1) SETUP YOUR MACHINE:

2) SETUP PRIVY-COMPONENT REPO:

  • In order to run Storybook you will have to run yarn start.
  • You may get an error that says you need to add the private NPM_TOKEN, either login to npm with privy's engineering account saved in last pass, or create an account and let the admin invite you to the project.
  • Once you have the NPM_TOKEN follow these steps: https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow.
  • Don't forget to exit and reopen the terminal.
  • Run yarn start and it should work!

    CLI commands:

  • To generate a new component boilerplate run yarn gernerate:component component-name.

    • The name of the component should always be lower-dashcase (e.g loading-component as opposed to LoadingComponent). The generator will automatically turn component-name into const ComponentName = (props) {..}
    • The generator automatically creates a webpack.config.js with proper entry and output paths.
    • Adds @babel/preset-react @babel/core webpack webpack-cli to package.json and runs yarn install
    • The generator creates a packages/component-name/lib/ComponentName.stories.js file for use with storybook.
    • The generator creates a functional react component boilerplate code in packages/component-name/lib/ComponentName.js - this is where you will build your component.

    TODO:

  • fill in Lerna commands.

Create new package

Publishing

To publish a new package, or an update that was made to an existing package you will need to do the following:

  • cd into the package you want to publish
  • run yarn publish
  • When prompted, enter a new patch/minor/major version increment that matches the update being made (modelled after semver)
  • If publishing a beta feature just for testing, it is recommended to use the --canary flag