Skip to content

Commit

Permalink
Move Auspice dep from the server code to the auspice-client customiza…
Browse files Browse the repository at this point in the history
…tions

Avoids bringing in all of Auspice's deps into the server code.  This is
generally useful, but it was also specifically useful in recent
prototyping to allow use of React 18 server components (as Auspice
requires React 16).  In any case, I think organizationally this makes
more sense anyway.

Related-to: <nextstrain/auspice#1661>
  • Loading branch information
tsibley committed Apr 6, 2023
1 parent 8b73f70 commit 36e511c
Show file tree
Hide file tree
Showing 8 changed files with 25,453 additions and 22,343 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
directory: "/auspice-client/"
# If you want to run this manually, go to https://github.com/nextstrain/nextstrain.org/network/updates
# and click "Last checked …" then "Check for updates".
schedule:
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,26 @@ npx auspice develop --verbose --extend ./customisations/config.json --handlers .
```

> If you're not familiar with [`npx`](https://www.npmjs.com/package/npx), it's a command to easily run programs installed by `npm`.
> Running `npx auspice` above is equivalent to `../node_modules/.bin/auspice`.
> Running `npx auspice` above is equivalent to `node_modules/.bin/auspice`.

### Using a different version of Auspice
Sometimes it is useful to change the version of Auspice that is used.
Perhaps you're upgrading the version nextstrain.org uses or you want to test changes in a local copy of Auspice against nextstrain.org.

If you're upgrading the version of Auspice used, install the new version with `npm install auspice@...`.
If you're upgrading the version of Auspice used, install the new version with:

```bash
cd auspice-client
npm install auspice@...
```

Replace `...` with the [semantic version specifier](https://docs.npmjs.com/about-semantic-versioning) you want.
This will change `package.json` and `package-lock.json` to reflect the new version you installed.
This will change `package.json` and `package-lock.json` (in `auspice-client/`) to reflect the new version you installed.
When preparing to commit your Auspice version change, you'll want to include those changed files too.
Run `npx auspice --version` to check that (a) it's installed correctly and (b) which version you have.
Run `npx auspice --version` (in `auspice-client/`) to check that (a) it's installed correctly and (b) which version you have.

Then build and run the server as above with either:
Then build and run the server from the repository root as above with either:

```bash
./build.sh auspice
Expand Down
1 change: 1 addition & 0 deletions auspice-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
Loading

0 comments on commit 36e511c

Please sign in to comment.