Skip to content

Commit 7ad381f

Browse files
timdavishbbmoz
authored andcommitted
Chore/#153875067 - Address direnv setup issue on MacOS in our setup guide (#107)
- other random formatting tweaks
1 parent c107c77 commit 7ad381f

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

Diff for: README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
Below is a cheatsheet for the scripts that can be found in `package.json`:
2525

2626
```bash
27-
$ yarn # install dependencies (npm install)
28-
$ yarn db # stop mongodb and seed db (npm run db)
29-
$ yarn start:dev # run in watch mode (npm run start:dev)
30-
$ yarn start # run the app through docker just like the test environment (npm start)
31-
$ yarn stop # stop and clean the app that was running through docker (npm stop)
32-
$ yarn test # run tests (npm test)
33-
$ yarn build # generate client distribution (npm run build)
27+
$ yarn # Install dependencies (npm install)
28+
$ yarn db # Restart a docker container with mongodb and add seed data (npm run db)
29+
$ yarn start:dev # Run the app locally in watch mode (npm run start:dev)
30+
$ yarn start # Run the app through docker just like the test environment (npm start)
31+
$ yarn stop # Stop and clean the app that was running through docker (npm stop)
32+
$ yarn test # Run tests (npm test)
33+
$ yarn build # Generate client distribution (npm run build)
3434
```
3535
*Although yarn is recommended, you may also use npm natively. The corresponding npm commands are in parenthesis above.*
3636

Diff for: docs/CONTRIBUTING.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,11 @@ $ git checkout -b <story type>/<story id>
134134
Always pair when you start a new branch:
135135

136136
```bash
137-
$ git solo <initials> # if you are working solo
138-
$ git duet <initials-1> <initials-2> # if you are pairing with someone
137+
# If you are working solo
138+
$ git solo <initials>
139+
140+
# If you are pairing with someone
141+
$ git duet <initials-1> <initials-2>
139142
```
140143

141144
*For more details, go to [developer environment setup](./DEVELOPER.md#rest).*
@@ -147,7 +150,7 @@ Reference the pivotal tracker **story id** for the story you are working on:
147150
```bash
148151
$ git commit
149152

150-
# below, the commit message is between the ---'s
153+
# Below, the commit message is between the ---'s
151154
---
152155
chore: add something
153156

Diff for: docs/DEVELOPER.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ See the [contribution guidelines](./CONTRIBUTING.md) to start contributing.
1616
```bash
1717
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
1818
```
19+
1920
*For more details, go to [Homebrew](https://brew.sh/).*
2021

2122
### <a name="rest"></a> 2. Install [Git Duet](https://github.com/git-duet/git-duet/#installation)
@@ -37,6 +38,7 @@ $ brew install yarn --without-node
3738
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash
3839
$ nvm install
3940
```
41+
4042
*If you are on a Mac and having trouble, make sure to run `touch ~/.bash_profile` before running the above command.*
4143

4244
### 5. Install [Direnv](https://github.com/direnv/direnv#install)
@@ -46,6 +48,29 @@ $ brew install direnv
4648
$ echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
4749
```
4850

51+
Note: In order for the above to work on MacOS, your .bash_profile needs to be setup to read your .bashrc by containing the following:
52+
53+
```bash
54+
# Either this
55+
[[ -r ~/.bashrc ]] && . ~/.bashrc
56+
57+
# Or this
58+
if [ -f $HOME/.bashrc ]; then
59+
source $HOME/.bashrc
60+
fi
61+
```
62+
63+
You can check your .bash_profile with:
64+
65+
```bash
66+
$ open ~/.bash_profile
67+
68+
# If it doesn't contain either of the above
69+
$ echo '[[ -r ~/.bashrc ]] && . ~/.bashrc' >> ~/.bash_profile
70+
```
71+
72+
*After doing this, anything in your .bash_profile other than the configuration above can now be moved to your .bashrc*
73+
4974
### 6. Restart the terminal and then run the following
5075

5176
```bash
@@ -89,6 +114,7 @@ $ test -d /home/linuxbrew/.linuxbrew && PATH="/home/linuxbrew/.linuxbrew/bin:$PA
89114
$ test -r ~/.bash_profile && echo 'export PATH="$(brew --prefix)/bin:$PATH"' >>~/.bash_profile
90115
$ echo 'export PATH="$(brew --prefix)/bin:$PATH"' >>~/.bash_profile
91116
```
117+
92118
*For more details, go to [Linuxbrew](http://linuxbrew.sh/).*
93119

94120
### 3. Follow Mac OS Setup starting from [section 2](#rest)
@@ -97,7 +123,7 @@ $ echo 'export PATH="$(brew --prefix)/bin:$PATH"' >>~/.bash_profile
97123

98124
> It is recommended that you use a mac or linux, but if you only have a pc, follow these steps to setup ubuntu bash.
99125
100-
### 1. Shell Setup
126+
### Shell Setup
101127

102128
1. Update your Windows 10 to the latest build.
103129
2. Run powershell as administrator and execute the following.

0 commit comments

Comments
 (0)