Skip to content

Commit

Permalink
Merge branch 'main' into toast
Browse files Browse the repository at this point in the history
  • Loading branch information
Connoropolous committed Oct 30, 2023
2 parents 86ee74f + 00f7d1d commit 52ae387
Show file tree
Hide file tree
Showing 14 changed files with 13,459 additions and 44,016 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Windows only, install wget
if: ${{ runner.os == 'Windows' }}
run: |
choco install wget --no-progress
- name: Install nodejs dependencies
- name: Run install
run: |
npm install
shell: bash
yarn install --frozen-lockfile
- name: setup for codesigning (macos only)
if: ${{ runner.os == 'macOs' }}
uses: figleafteam/import-codesign-certs@v2
Expand All @@ -38,5 +41,5 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
DEBUG: electron-osx-sign*,electron-notarize*
run: |
npm run build
yarn run build
shell: bash
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Windows only, install wget
if: ${{ runner.os == 'Windows' }}
run: |
choco install wget --no-progress
- name: Install nodejs dependencies
- name: Run install
run: |
npm install
shell: bash
yarn install --frozen-lockfile
- name: setup for codesigning (macos only)
if: ${{ runner.os == 'macOs' }}
uses: figleafteam/import-codesign-certs@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install web dependencies
run: npm install -w web
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Run install
run: |
yarn install --frozen-lockfile
- name: Storybook static build
run: |
npm run build-storybook -w web
yarn workspace acorn-ui build-storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install nodejs dependencies
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Run install
run: |
npm install -w web
shell: bash
yarn install --frozen-lockfile
- name: Build zod-models dependency
run: |
npm run build -w zod-models
yarn workspace zod-models build
shell: bash
- name: run unit tests
run: |
npm run test -w web
yarn workspace acorn-ui test
shell: bash
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.yarn

binaries
node_modules
out/
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
30 changes: 15 additions & 15 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,46 @@

_Prerequisites_

- Have nodejs installed on your system
- Have `nodejs` (v20) and `yarn` (v1, classic) installed on your system

Then run

- `npm install`
- `npm run dev`
- `yarn install`
- `yarn run dev`

In the future, just run `npm run dev` anytime to develop.
In the future, just run `yarn run dev` anytime to develop.

When you run `npm run dev` a `user-data/` directory is created and this is where user data including private keys, and also data generated through use of the app is stored.
When you run `yarn run dev` a `user-data/` directory is created and this is where user data including private keys, and also data generated through use of the app is stored.

You can run `npm run user-data-reset` if you have user data in development, but you want to clear it, and start over with fresh identities.
You can run `yarn run user-data-reset` if you have user data in development, but you want to clear it, and start over with fresh identities.

> NOTE: if you see a blank screen once electron launches the app, refresh the page (using View -> Reload or Cmd/Ctrl-R) to see app contents.
#### Commands that are more specific to your use case:

You can run the web process and the electron processes separately, instead of running `npm run dev` which combines them.
You can run the web process and the electron processes separately, instead of running `yarn run dev` which combines them.

**web** (user interface)

- `npm run web`
- `yarn run web`

**electron**

- `npm run electron`
- `yarn run electron`

#### Multi-User Testing
run the following commands in separate terminal instances (must have a running instance of acorn for the first user, either by running `npm run dev` or the below commands without the `2`):
run the following commands in separate terminal instances (must have a running instance of acorn for the first user, either by running `yarn run dev` or the below commands without the `2`):

- `npm run web(2,3,4)`
- `npm run electron(2,3,4)`
- `yarn run web(2,3,4)`
- `yarn run electron(2,3,4)`

After running these commands, a `user-data/` directory is created with user data. It too can be cleared by running `npm run user-data-reset`.
After running these commands, a `user-data/` directory is created with user data. It too can be cleared by running `yarn run user-data-reset`.

### Building / Packaging

To build:

- `npm run build`
- `yarn run build`

The packaged executables can be found in `frontend/electron/out`.

Expand Down Expand Up @@ -85,7 +85,7 @@ The happ code has been separated into its own repository with its own release pr

The repo is here: https://github.com/lightningrodlabs/acorn-happ.

After making changes, and performing a release, just edit [./scripts/download-happs.sh](./scripts/download-happs.sh) to point to the new release, and then run `npm run download-happs` to download the new release.
After making changes, and performing a release, just edit [./scripts/download-happs.sh](./scripts/download-happs.sh) to point to the new release, and then run `yarn run download-happs` to download the new release.

As mentioned above, INTEGRITY_VERSION_NUMBER should be incremented when the happ release has been updated.

Expand Down
11 changes: 5 additions & 6 deletions electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "Open source peer-to-peer project management for software teams",
"main": "dist/index.js",
"scripts": {
"start": "tsc && electron .",
"build": "tsc && electron-builder build",
"start": "electron .",
"build": "electron-builder build",
"tsc": "tsc",
"lint": "eslint --ext .ts ."
},
Expand Down Expand Up @@ -44,20 +44,19 @@
}
},
"devDependencies": {
"@electron/notarize": "^2.1.0",
"@types/node": "20.8.9",
"@types/split": "^1.0.0",
"electron": "20.3.12",
"electron-builder": "24.8.0",
"@electron/notarize": "^2.1.0",
"eslint": "^7.25.0",
"eslint-plugin-import": "^2.22.1",
"typescript": "^4.2.4"
"eslint-plugin-import": "^2.22.1"
},
"dependencies": {
"@lightningrodlabs/electron-holochain": "=0.7.8",
"electron-context-menu": "^3.5.0",
"electron-log": "^4.3.5",
"electron-default-menu": "^1.0.2",
"electron-log": "^4.3.5",
"split": "^1.0.1"
}
}
Loading

0 comments on commit 52ae387

Please sign in to comment.