1.0.8 • Published 2 years ago

neeto-commons-frontend v1.0.8

Weekly downloads
-
License
apache-2.0
Repository
github
Last release
2 years ago

neeto-commons-frontend

The commons frontend library for Neeto Applications.

Installation Instructions

Install from npm:

yarn add "neeto-commons-frontend@1.0.8"

This package relies on the host project's tailwind configuration. So add neeto-commons-frontend to your project's tailwind.config.js file:

module.exports = {
  purge: {
    content: [
      // ... other content directories
      "./node_modules/neeto-commons-frontend/**/*.js",
    ],
  },
  // ... other tailwind config options
};

Usage

This package exports four different sets of functions and components. Click on them to read more:

  1. Initializers
  2. React utilities
  3. General utility functions

Development instructions

  1. Clone this repository.
  2. Run yarn install to download the dependencies and setup the development environment.
  3. Have a host application ready.
  4. Run yarn build --watch to automatically transpile code as you save the file. You can omit the --watch flag if you want to run the build only once.
  5. In a different terminal, run yalc publish to publish the neeto-commons-frontend to the local yalc store.
  6. Run yalc install to install the neeto-commons-frontend to the host application.
  7. After making all changes to neeto-commons-frontend, run yal push to push the changes to the host application.
  8. Video explanation on how to use yalc: https://vimeo.com/722958162/9e931b640c

Building and releasing.

This is how releases are managed in this repo.

  • We will create a branch with the next release version as its name (1.0.x) from master branch.
  • Version in README.md and package.json will be updated to the current branch name.
  • From now on, we can install the package to neeto-applications using the version 1.X.Y.
  • We will create a draft PR of this branch targeting master. This keeps the branch in sync with master branch (bot-bigbinary will auto-merge the changes).
  • When all features have been built, we will deploy it to all neeto-applications locally using yalc package manager. We won't raise PR until the deployment and verification is successfully done locally for all neeto-applications. The usage of yalc is explained in this video: https://vimeo.com/722958162/9e931b640c
  • In case if we notice any problem during verification, like any missed edge cases, we will fix the problem in this repo and re-run yalc push to install the latest changes.
  • Once everything is fine and the verification is complete, we will create a new github release from 1.X.Y branch with the exact same name for the tag (1.X.Y). The target branch will be kept as 1.X.Y. This will create a tag from the latest 1.X.Y branch and this ensures that the latest commit on that branch will remain intact even if that branch gets deleted.
  • Whenever a new release is created with a new version number, the github actions will automatically publish the built package to npm.
  • Now we will squash and merge the PR 1.X.Y to master and delete its source branch. This will delete all commits except the top one (since we have created a tag with it).
  • Immediately, we will open another branch with the next version (1.X.Y) and the cycle will continue.
  • Now we can run yalc remove neeto-commons-frontend to remove yalc based package and run yarn add neeto-commons-frontend@1.X.Y to fetch the latest changes from npm in all repos and raise PR. You might be able to slightly tweak this script to get the job done: https://gist.github.com/jagannathBhat/42a584748d97fe134f0abadb191ef29a
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago