@proprioo/salatim
TypeScript icon, indicating that this package has built-in type declarations

35.9.0 • Public • Published

Salatim

Salatim is our component library, made with 🥑 and ❤️.

Please have a look on its storybook for each components.

Before

Don't forget to add an empty NPM_TOKEN in your bash_profile, zsh, etc.. and reload it.

export NPM_TOKEN=''

Status

build status

Branches Functions Lines Statements
branches coverage functions coverage lines coverage statements coverage

Pages

Source Map Explorer

Storybook

How to dev ?

Use yarn dev

How to build ?

Use yarn build

Update version

Before each change, please update CHANGELOG.md with a new version using the following template:

**major.minor.patch**

    * Commit message

    OR

    **BREAKING CHANGE** Commit message
  • Fix: patch
  • Component / Feature: minor
  • Everything which can bring changes in the different projects: major

When changelog is updated, don't forget to bump the package.json version with:

$ yarn version --major | --minor | --patch

Release new version

Pushing a new version in the master branch automatically trigger a new release of the NPM package.

Backport a fix

If you have to backport something to an old version of salatim :

  1. go to the old version's branch (for example: v15 before the rebranding)
  2. add your commit(s), and don't forget to bump the version in package.json and CHANGELOG.md (if you fix something and the previous version was 15.2.3, bump to 15.2.4)
  3. push the branch, don't forget it!
  4. run yarn clean && yarn build locally to make the package ready to be published
  5. run yarn publish --access=public --non-interactive --tag 15.2.4 locally. Don't forget the --tag argument to prevent overriding the latest version.

You can then bump your project with this new version of salatim. ;)

Update phone metadata

We cannot accept every phone numbers in the application, mainly due to some optimization (Metadata JSON is a big file). When an error is triggered on AppSales (Failed to parse phone number +XXXX), we need to update the phone Metadata to accept it.

  1. Find the country calling code, to do so:
    1. Go to Phone.tsx, change PhoneInput import to 'react-phone-number-input' and remove metadata attribute in JSX (like this we're accepting every possible phone numbers)
    2. Start locally Storybook and copy / paste your troublesome phone number to find the country calling code.
  2. Go to CountryCode.org and find your country calling code.
  3. Use the 2 digit ISO found to update the script generate-phone-metadata, then run this script (Metadata will be automatically generated).
  4. We also need to update the Phone component to accept this new option, go to constants and add this 2 digit ISO in both constants.
  5. Do not forget to rollback your changes in PhoneInput.tsx, then update Changelog.md and package.json version and you're up to go.

Package Sidebar

Install

npm i @proprioo/salatim

Weekly Downloads

345

Version

35.9.0

License

MIT

Unpacked Size

1.93 MB

Total Files

258

Last publish

Collaborators

  • ydelpierre
  • techproprioo