Skip to content

Commit

Permalink
chore: clean up all package-lock.jsons (#330)
Browse files Browse the repository at this point in the history
* chore: clean up all package-lock.jsons

* chore: add changeset for package-lock removals

* docs: update readme with not on installing package deps

* docs: add note on component package-locks
  • Loading branch information
zchsh committed Sep 13, 2021
1 parent dcde100 commit 44a0e60
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 57,280 deletions.
20 changes: 20 additions & 0 deletions .changeset/afraid-gifts-protect.md
@@ -0,0 +1,20 @@
---
'@hashicorp/react-accordion': patch
'@hashicorp/react-callouts': patch
'@hashicorp/react-case-study-slider': patch
'@hashicorp/react-checkbox-input': patch
'@hashicorp/react-consent-manager': patch
'@hashicorp/react-enterprise-alert': patch
'@hashicorp/react-featured-slider': patch
'@hashicorp/react-learn-callout': patch
'@hashicorp/react-logo-grid': patch
'@hashicorp/react-min-100-layout': patch
'@hashicorp/react-search': patch
'@hashicorp/react-subnav': patch
'@hashicorp/react-tabbed-accordion': patch
'@hashicorp/react-tabs': patch
'@hashicorp/react-text-input': patch
'@hashicorp/react-toggle': patch
---

Removes package-lock.json
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -15,6 +15,16 @@ The `packages` directory contains all the individual components. Let's talk abou
- `docs.mdx`: documentation for the component, see [swingset docs](https://github.com/hashicorp/swingset#usage) for more details on the format
- `props.js`: information about the component's props, see [swingset docs](https://github.com/hashicorp/swingset#props) for more details on the format

## Adding package dependencies

We use [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/) to manage dependencies for all packages. With this in mind, all new dependencies should be added from the project root, using the `--workspace` argument. For example, to add the [`classnames`](https://www.npmjs.com/package/classnames) package to our `button` component, you would run:

```
npm i classnames --workspace=@hashicorp/react-button
```

> Note: with this in mind, package folders, such as `packages/button`, should not contain `package-lock.json` files. If you accidentally install a dependency from within a package folder, please ensure you 1) remove the `package-lock.json` file, and 2) re-run `npm i` from the project root to ensure the root `package-lock.json` is up to date.
## Environment Variables

A few of the elements in our playground rely on environment variables in order to function correctly. We have a `react-components .env.local` stored in 1Password if you'd like to quickly get started. Details on each environment variable:
Expand Down
131 changes: 0 additions & 131 deletions packages/accordion/package-lock.json

This file was deleted.

1 comment on commit 44a0e60

@vercel
Copy link

@vercel vercel bot commented on 44a0e60 Sep 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.