Skip to content

Commit

Permalink
docs: add setup.sh script and update README.md (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebecca-thompson authored Nov 10, 2022
1 parent 441766b commit 75b33d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ Modelling non-text content in Prosemirror can be tricky. `prosemirror-elements`

## Setup

`yarn` installs and sets up the project dependencies.
1. Ensure you have `dev-nginx` and `yarn` installed on your local machine.
2. Run the setup script: `./script/setup.sh`

## Run

1. Ensure nginx is running.
2. `yarn start` builds the project locally, spins up a webserver on http://localhost:7890, and watches for file changes.
2. `yarn start` builds the project locally, spins up a webserver on https://prosemirror-elements.local.dev-gutools.co.uk, and watches for file changes.

## Testing

Expand Down
20 changes: 20 additions & 0 deletions script/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(dirname "$DIR")"

setupNginx() {
echo -e "\033[32mSetting up Nginx mapping\033[0m\n"
dev-nginx setup-app ${ROOT_DIR}/nginx/dev-nginx.yaml
}

installYarn() {
echo -e "\033[32mInstalling JS dependencies\033[0m\n"
yarn
}

main() {
setupNginx
installYarn
echo -e "\033[32mInstallation complete.\033[0m\n"
}

main

0 comments on commit 75b33d5

Please sign in to comment.