Skip to content

Commit 0b271e2

Browse files
committed
Updating package.json and README.md
1 parent 2178fe8 commit 0b271e2

File tree

2 files changed

+4
-60
lines changed

2 files changed

+4
-60
lines changed

README.md

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,63 +18,7 @@ npm run storybook
1818

1919
## Usage
2020

21-
### SSH Configuration
22-
Update your SSH config to use your SSH key to access the react-components repository:
23-
24-
```
25-
# ~/.ssh/config
26-
27-
Host react-components
28-
HostName github.com
29-
IdentityFile ~/.ssh/id_rsa
30-
```
31-
32-
### Install
33-
```
34-
npm install git+ssh://git@react-components:performant-software/react-components.git --save
35-
```
36-
37-
### Heroku
38-
When deploying to a staging server on Heroku, we'll need to allow Heroku access to the react-components repository in order to install dependencies. This section will describe how to do that.
39-
40-
#### Copy preinstall and postinstall scripts
41-
Copy the `preinstall.sh` and `postinstall.sh` scripts from this repository into your project. It doesn't matter where, but a directory named `scripts` is usually a good idea.
42-
43-
#### Update package.json
44-
In your root level `package.json`, add or append the following to the `scripts` object:
45-
```
46-
"heroku-prebuild": "bash ./scripts/preinstall.sh"
47-
"heroku-postbuild": "bash ./scripts/postinstall.sh"
21+
#### Install
4822
```
49-
These two scripts will install your SSH key prebuild, then after the dependencies are installed, remove it.
50-
51-
Note: The heroku-prebuild and heroku-postbuild scripts require the NodeJS buildpack.
52-
53-
You'll want to use the following syntax for defining the `react-components` dependency:
54-
23+
npm install
5524
```
56-
"react-components": "github:performant-software/react-components"
57-
```
58-
59-
Note: `yarn` does not seem to work with the above syntax. It is recommended to use `npm`.
60-
61-
#### Generate a deploy key
62-
From your computer, generate a new public/private SSH key pair using the following command and save the key pair somewhere secure.
63-
```
64-
ssh-keygen -t rsa
65-
```
66-
67-
Copy the public key using:
68-
```
69-
pbcopy < my-awesome-project-staging-deploy-key.pub
70-
```
71-
72-
Within the react-components repository on GitHub, go to Settings > Deploy Keys. Add the copied public key for your project. Name it something obvious like "My Awesome Project Staging" so that others will know what it is used for.
73-
74-
#### Add your deploy key to Heroku
75-
Convert the private key from PEM to base64 using the following command and copy the value.
76-
```
77-
cat my-awesome-project-staging-deploy-key | base64
78-
```
79-
80-
In the Heroku dashboard for your app, navigate to the Settings tab. Add a config var with key `REACT_COMPONENTS_SSH_KEY` and paste the value copied from the private deploy key.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "react-components",
3-
"version": "1.0.0",
2+
"name": "@performant-software/react-components",
3+
"version": "0.2.1",
44
"description": "A library of shared React components",
55
"files": [
66
"build",

0 commit comments

Comments
 (0)