2.1.0 • Published 3 months ago

@timmons-group/shared-react-components v2.1.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

Timmons Group Shared React Components

Overview 📚

This repo contains the source code for the Timmons Group Shared React Components npm library.

Core Files/Folders 📂

src/helpers - Helper/utility functions.

src/hooks - Reusable hooks for generic routines such as auth and data fetching.

src/stories - Storybook stories and reusable components.

Install Dependencies 🧩

  1. Install the LTS version of Node JS
  2. npm i

How to Run Storybook Locally 📖

Storybook will let you develop locally without the need to integrate this lib with an application (see the section below on Running Locally with a Target Project 🏃‍♂️). This sort of development is best suited for isolated component development.

  1. cd src
  2. npm start

How to Run Locally and Link to a Target Project 🏃‍♂️

We can run this library within a local project/application by using npm link. This sort of development is best suited for situations where you need to work on the hooks/helpers or want to do some manual integration testing of the components within your target project.

  1. Delete the @timmons-group folder in the node_modules folder of the target project.
    1. IMPORTANT: This deletion needs to be done while the target project's react-scripts / webpack is not running. If you are running the target project, you will need to stop it first.
  2. Boot up the target project's dev web server and let webpack fail (due to the goodies we just deleted).
  3. Stop your dev web server.
  4. In this repo run npm run build:package
  5. In this repo run npm link
  6. In the target repo run npm link @timmons-group/shared-react-components
  7. Restart the target repo's web server and you should be all set
  8. Make changes to this shared component repo and then run npm run build:package-localdev
    • You may indiviudally build any of the file types if you are not working on all of them:
      • npm run build:components - This will build the components and stories
      • npm run build:helpers - This will build the helpers
      • npm run build:hooks - This will build the hooks
      • npm run build:index - This will build the index (components that are exported for use) and constants
        • This must be run if you are adding a new component to the index file for the first time

Ok fine, but how do I get back to the published version? 🤷‍♂️

To remove the npm link

  1. Delete the @timmons-group folder in the node_modules folder of the target project.
  2. Run npm i in the target project.
    1. If you simply npm i again artifacts from the npm link will still be there.

How to Build 🔨

  1. npm run build:package

How to Publish to NPM 📦

TODO: add some goodies here about tagging

https://docs.npmjs.com/cli/v9/commands/npm-publish

How to Publish a beta version to NPM

Note about beta versions of the package

  • They will NOT install via npm i @timmons-group/shared-react-components@latest
  • Will not appear on npm outdated OR install via npm update.

Steps to publish a beta version of the package to beta.

  1. Modify version in package.json to the following format (match with existing version numbers etc)
    • "version": "0.1.120-beta.x" where beta.x is the number of those betas
  2. Build the package
    • npm run build:package
  3. Publish to npm
    • npm publish --tag beta

There are two options for installation / testing in a project: 1. Always install beta

  • npm install @timmons-group/shared-react-components@beta
  1. Install specific version with
    • npm install @timmons-group/shared-react-components@0.1.120-beta.1

How to fix latest if you publish a beta without --tag beta

How to fix latest if you publish a beta without --tag beta (it will default to latest) run: npm dist-tags add @timmons-group/shared-react-components@1.0.3 latest --otp=123456 where 1.0.3 is the version that should be latest --otp= is required

Who do I Talk to? 🙋‍♀️

  • Bryant Overgard
  • Nathan Grant
  • Travis Walters
  • Chaz Mateer

Create React App (CRA) Boilerplate Below 🍽


Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.\ Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.\ You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.\ See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.\ It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

2.1.0-beta.16

3 months ago

2.1.0

3 months ago

2.1.0-beta.15

4 months ago

2.1.0-beta.14

4 months ago

2.1.0-beta.13

5 months ago

2.1.0-beta.12

5 months ago

2.1.0-beta.11

5 months ago

2.1.0-beta.10

5 months ago

2.1.0-beta.5

5 months ago

2.1.0-beta.7

5 months ago

2.1.0-beta.6

5 months ago

2.1.0-beta.9

5 months ago

2.0.1

5 months ago

2.1.0-beta.1

7 months ago

2.1.0-beta.3

7 months ago

2.1.0-beta.2

7 months ago

2.1.0-beta.0

7 months ago

2.0.0

8 months ago

2.0.0-beta.9

9 months ago

2.0.0-alpha.3

1 year ago

1.2.0

11 months ago

1.2.1

10 months ago

2.0.0-beta.8

9 months ago

2.0.0-beta.7

9 months ago

2.0.0-beta.2

10 months ago

2.0.0-beta.1

11 months ago

2.0.0-beta.0

11 months ago

2.0.0-beta.6

9 months ago

2.0.0-beta.5

9 months ago

2.0.0-beta.4

9 months ago

2.0.0-beta.3

10 months ago

1.2.0-alpha.2

12 months ago

1.2.0-alpha.3

11 months ago

1.2.0-alpha.0

1 year ago

1.2.0-alpha.1

1 year ago

1.1.0

1 year ago

1.1.0-alpha.2

1 year ago

2.0.0-alpha.0

1 year ago

1.0.3-alpha.3

1 year ago

1.0.3-alpha.2

1 year ago

1.1.0-alpha.1

1 year ago

1.0.3-alpha.1

1 year ago

1.0.2

1 year ago

1.0.2-alpha.8

1 year ago

1.1.0-alpha.0

1 year ago

1.0.2-alpha.7

1 year ago

1.0.2-alpha.6

1 year ago

1.0.2-alpha.4

1 year ago

1.0.2-alpha.5

1 year ago

1.0.2-alpha.2

1 year ago

1.0.2-alpha.3

1 year ago

1.0.2-alpha.1

1 year ago

1.0.2-alpha.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.1-alpha.12

1 year ago

0.0.1-alpha.14

1 year ago

0.0.1-alpha.13

1 year ago

1.0.0-gamma.5

1 year ago

1.0.0-gamma.4

1 year ago

1.0.0-gamma.3

1 year ago

1.0.0-gamma.2

1 year ago

1.0.0-gamma.1

2 years ago

1.0.0-gamma.0

2 years ago

1.0.0-alpha.9

2 years ago

1.0.0-alpha.8

2 years ago

1.0.0-alpha.7

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.5

2 years ago

1.0.0-alpha.4

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago

0.9.5-beta.6

2 years ago

0.9.5-beta.5

2 years ago

0.9.5-beta.9

2 years ago

0.9.5-beta.8

2 years ago

0.9.5-beta.7

2 years ago

0.9.6

2 years ago

0.9.5

2 years ago

0.9.5-beta.17

2 years ago

0.9.5-beta.16

2 years ago

0.9.5-beta.19

2 years ago

0.9.5-beta.18

2 years ago

0.9.5-beta.11

2 years ago

0.9.5-beta.10

2 years ago

0.9.5-beta.13

2 years ago

0.9.5-beta.12

2 years ago

0.9.5-beta.15

2 years ago

0.9.5-beta.14

2 years ago

0.9.5-beta.28

2 years ago

0.9.5-beta.27

2 years ago

0.9.5-beta.29

2 years ago

0.9.5-beta.20

2 years ago

0.9.5-beta.22

2 years ago

0.9.5-beta.21

2 years ago

0.9.5-beta.24

2 years ago

0.9.5-beta.23

2 years ago

0.9.5-beta.26

2 years ago

0.9.5-beta.25

2 years ago

0.9.5-beta.31

2 years ago

0.9.5-beta.30

2 years ago

0.9.5-beta.33

2 years ago

0.9.5-beta.32

2 years ago

0.9.5-beta.35

2 years ago

0.9.5-beta.34

2 years ago

0.9.5-beta.36

2 years ago

1.0.0-beta.0

2 years ago

0.9.7-alpha.0

2 years ago

0.9.5-beta.2

2 years ago

0.9.5-beta.1

2 years ago

0.9.5-beta.4

2 years ago

0.9.5-beta.3

2 years ago

0.9.5-beta.0

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.3-beta.3

2 years ago

0.9.3-beta.4

2 years ago

0.9.3-beta.2

2 years ago

0.9.3-beta.0

2 years ago

0.9.1-beta.0

2 years ago

0.9.1-beta.1

2 years ago

0.9.1-beta.2

2 years ago

0.9.1-beta.3

2 years ago

0.9.1-beta.4

2 years ago

0.9.2-beta.2

2 years ago

0.9.2-beta.1

2 years ago

0.9.2-beta.0

2 years ago

0.9.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0-beta.5

2 years ago

0.9.0-beta.7

2 years ago

0.9.0-beta.6

2 years ago

0.9.0-beta.9

2 years ago

0.9.0-beta.8

2 years ago

0.9.0-beta.12

2 years ago

0.9.0-beta.11

2 years ago

0.9.0-beta.10

2 years ago

0.8.0

2 years ago

0.8.0-beta.18

2 years ago

0.8.0-beta.14

2 years ago

0.8.0-beta.15

2 years ago

0.8.0-beta.16

2 years ago

0.8.0-beta.17

2 years ago

0.8.0-beta.10

2 years ago

0.8.0-beta.11

2 years ago

0.8.0-beta.12

2 years ago

0.8.0-beta.13

2 years ago

0.9.0-beta.1

2 years ago

0.9.0-beta.3

2 years ago

0.9.0-beta.2

2 years ago

0.9.0-beta.4

2 years ago

0.8.0-beta.7

2 years ago

0.8.0-beta.8

2 years ago

0.8.0-beta.5

2 years ago

0.8.0-beta.6

2 years ago

0.8.0-beta.9

2 years ago

0.8.0-beta.3

2 years ago

0.8.0-beta.4

2 years ago

0.8.0-beta.1

2 years ago

0.8.0-beta.2

2 years ago

0.7.0-beta.21

2 years ago

0.7.0-beta.20

2 years ago

0.7.0-beta.16

2 years ago

0.7.0-beta.15

2 years ago

0.7.0-beta.18

2 years ago

0.7.0-beta.17

2 years ago

0.7.0-beta.19

2 years ago

0.7.0-beta.14

2 years ago

0.7.0-beta.13

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.7.0-beta.1

2 years ago

0.7.0-beta.2

2 years ago

0.7.0-beta.3

2 years ago

0.7.0-beta.8

2 years ago

0.7.0-beta.9

2 years ago

0.7.0-beta.4

2 years ago

0.7.0-beta.5

2 years ago

0.7.0-beta.6

2 years ago

0.7.0-beta.7

2 years ago

0.7.0-beta.10

2 years ago

0.7.0-beta.12

2 years ago

0.7.0-beta.11

2 years ago

0.6.1-beta.1

2 years ago

0.6.1-beta.2

2 years ago

0.6.1

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.2-beta.1

3 years ago

0.3.17

3 years ago

0.4.2-beta.2

3 years ago

0.5.1-beta.1

2 years ago

0.4.10

2 years ago

0.4.11

2 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.5.0

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.5.2

2 years ago

0.4.3

3 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.4.2

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago