Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): updates to local dev setup instructions #207

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ To test the functionality of these scripts, you can run the following commands i
1. `npm i`: Installs all the required project dependencies
2. Clone the other interconnected repositories:
```bash
git clone https://github.com/DPGAlliance/publicgoods-website.git ../publicgoods-website
git clone https://github.com/DPGAlliance/publicgoods-website.git ../publicgoods-website-test
git clone https://github.com/DPGAlliance/publicgoods-candidates.git ../publicgoods-candidates
```
3. `./scripts/static.bash`: crawls a private instance of the WordPress website and saves a copy in `../publicgoods-website`
4. `pushd packages/automation && node consolidate_data.js && popd`: consolidates nomiees and DPGs from the new api into a single `nominees.json` file for the registry page.
4. `pushd packages/automation && node consolidate_data.js && popd`: consolidates nominees and DPGs from the new api into a single `nominees.json` file for the registry page.
5. ~~`pushd packages/automation && node generate_dpgs.js && popd`: generates the individual website pages for each vetted digital public good~~
6. ~~`pushd packages/automation && node generate_nominees.js && popd`: queries the GitHub API for activity data for each linked repo~~
7. `pushd packages/automation && node index.js && popd`: generates the registry page
8. `pushd packages/registry && npm run build && popd`: builds the React components associated with the registry
8. `pushd packages/eligibility && npm run build && popd`: builds the React components associated with the eligibility information
8. `pushd packages/roadmap && npm run build && popd`: builds the React components associated with the roadmap information
9. `./scripts/moveFiles.bash`: moves the React components generated above and the registry page into the website folder

To test the result:
1. Change folders into the website repo: `cd ../publicgoods-website`
1. Change folders into the website repo: `cd ../publicgoods-website-test`
2. Run a webserver: `./.develop.bash`
3. Point your browser to http://localhost:8080 to see the result

Expand Down
6 changes: 3 additions & 3 deletions scripts/moveFiles.bash
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
pushd ../publicgoods-website-test/registry && \
git rm -rf static/* || true && \
mkdir static && \
mkdir static || true && \
cp -a ../../publicgoods-scripts/packages/registry/build/static/* static && \
git add static/* && \
cp ../../publicgoods-scripts/packages/registry/build/index.html . && \
popd

pushd ../publicgoods-website-test/eligibility && \
git rm -rf static/* || true && \
mkdir static && \
mkdir static || true && \
cp -a ../../publicgoods-scripts/packages/eligibility/build/static/* static && \
git add static/* && \
cp ../../publicgoods-scripts/packages/eligibility/build/index.html . && \
Expand All @@ -26,7 +26,7 @@ popd

pushd ../publicgoods-website-test/roadmap && \
git rm -rf static/* || true && \
mkdir static && \
mkdir static || true && \
cp -a ../../publicgoods-scripts/packages/roadmap/build/static/* static && \
git add static/* && \
cp ../../publicgoods-scripts/packages/roadmap/build/index.html . && \
Expand Down