Skip to content
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
10 changes: 2 additions & 8 deletions .claude/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
"version": "0.0.1",
"configurations": [
{
"name": "web-stage",
"name": "web",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "web:stage"],
"port": 3003
},
{
"name": "web-prod",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "web:prod"],
"runtimeArgs": ["run", "web"],
"port": 3002
}
]
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ npm run protocol
audius-compose connect

# Run web application
npm run web:dev # Against local services
npm run web:stage # Against staging
npm run web:prod # Against production
npm run web # Against production
npm run web:local # Against local services

# Run mobile applications
npm run mobile # Metro only — preferred for JS-only changes; user opens the simulator manually with the existing build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Environments:
For example:

```bash
npm run web:prod
npm run web
```

For all available commands please see the [package.json scripts](https://github.com/AudiusProject/apps/blob/f850434ddca7d697f78a58d971f9bba1aba7f24d/package.json#L10) and the relevant package READMEs.
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,17 @@
"buf:generate": "buf generate buf.build/audiusd/audiusd:as/rm-old-protos --include-imports && npm run buf:generate:postinstall",
"buf:generate:postinstall": "cd packages/discovery-provider/src/tasks/core && ./fix-proto-imports.sh",
"WEB========================================": "",
"web:dev": "npm run start:dev -w @audius/web",
"web:prod": "npm run start:prod -w @audius/web",
"web:stage": "npm run start:stage -w @audius/web",
"web": "npm run start -w @audius/web",
"web:local": "npm run start:local -w @audius/web",
"web:e2e": "npm run test:e2e -w @audius/web",
"web:test": "turbo run test --filter=@audius/web",
"web:example:trending": "cd packages/web/examples/trending && npm run dev",
"web:example:update-profile": "cd packages/web/examples/update-profile && npm run dev",
"web:example:upload": "cd packages/web/examples/upload && npm run dev",
"web:example:gated-upload": "cd packages/web/examples/gated-upload && npm run dev",
"DESKTOP====================================": "",
"desktop:dev": "concurrently -k 'BROWSER=none npm run start:dev -w @audius/web' 'wait-on http://0.0.0.0:3000 && npm run electron:localhost -w @audius/web -- 3000'",
"desktop:prod": "concurrently -k 'BROWSER=none npm run start:prod -w @audius/web' 'wait-on http://0.0.0.0:3002 && npm run electron:localhost -w @audius/web -- 3002'",
"desktop:stage": "concurrently -k 'BROWSER=none npm run start:stage -w @audius/web' 'wait-on http://0.0.0.0:3001 && npm run electron:localhost -w @audius/web -- 3001'",
"desktop": "concurrently -k 'BROWSER=none npm run start -w @audius/web' 'wait-on http://0.0.0.0:3002 && npm run electron:localhost -w @audius/web -- 3002'",
"desktop:local": "concurrently -k 'BROWSER=none npm run start:local -w @audius/web' 'wait-on http://0.0.0.0:3000 && npm run electron:localhost -w @audius/web -- 3000'",
"MOBILE=====================================": "",
"android:dev": "npm run android:dev -w @audius/mobile",
"android:prod": "npm run android:prod -w @audius/mobile",
Expand Down
19 changes: 10 additions & 9 deletions packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@

## Development

There are 3 environments you can develop against
There are 2 environments you can develop against

- prod (main net) — the default
- dev (local net, see the [Audius Protocol](https://github.com/AudiusProject/apps))
- stage (test net)
- prod (main net)

### Running

```bash
npm run start:<environment>
npm run start # Against production (default)
npm run start:local # Against local services
```

When running against a dev environment on a remote machine, enable a network proxy:
Expand All @@ -42,25 +42,26 @@ networksetup -setautoproxyurl "Wi-Fi" "http://$AUDIUS_REMOTE_DEV_HOST:8080/proxy
### Building

```bash
# Bundles static assets into ./build-<environment>
npm run build:<environment>
# Bundles static assets into ./build-<environment>, where <environment> is dev or prod
npm run build:dev
npm run build:prod
```

### Electron (Desktop App)

To run electron using a static build:

```bash
npm run build:<environment>
npm run electron:<environment>
npm run build:prod
npm run electron:prod
# Or to point at a local service with an optional port specifier
npm run electron:localhost # -- <port>
```

To build a desktop binary using a static build (outputs to `./dist`):

```bash
npm run build:<environment>
npm run build:prod

# Build all the binaries!!
npm run dist
Expand Down
12 changes: 5 additions & 7 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
"preview:prod": "npm run build:prod && env-cmd ./env/.env.prod vite preview --outDir build-production",
"preview:dev": "npm run build:dev && env-cmd ./env/.env.dev vite preview --outDir build-development",
"publish-scripts": "./scripts/publishScripts.sh",
"start:dev": "env-cmd --no-override ./env/.env.dev turbo run start",
"start:stage": "env-cmd --no-override ./env/.env.stage turbo run start",
"start:prod": "env-cmd --no-override ./env/.env.prod env-cmd ./env/.env.source-maps turbo run start",
"start:ssr:dev": "env-cmd --no-override ./env/.env.dev env-cmd ./env/.env.ssr turbo run start",
"start:ssr:stage": "env-cmd --no-override ./env/.env.stage env-cmd ./env/.env.ssr turbo run start",
"start:ssr:prod": "env-cmd --no-override ./env/.env.prod env-cmd ./env/.env.ssr env-cmd ./env/.env.source-maps turbo run start",
"start": "npm run write-sha && npm run publish-scripts && env-cmd ./env/.env.git vite",
"start": "env-cmd --no-override ./env/.env.prod env-cmd ./env/.env.source-maps turbo run start:vite",
"start:local": "env-cmd --no-override ./env/.env.dev turbo run start:vite",
"start:ssr": "env-cmd --no-override ./env/.env.prod env-cmd ./env/.env.ssr env-cmd ./env/.env.source-maps turbo run start:vite",
"start:ssr:local": "env-cmd --no-override ./env/.env.dev env-cmd ./env/.env.ssr turbo run start:vite",
"start:vite": "npm run write-sha && npm run publish-scripts && env-cmd ./env/.env.git vite",
"stylelint:fix": "npm run stylelint -- --fix",
"stylelint": "stylelint 'src/**/*.css'",
"test:e2e": "npx playwright test",
Expand Down
6 changes: 6 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"dependsOn": ["^build"],
"outputLogs": "new-only"
},
"start:vite": {
"cache": false,
"persistent": true,
"dependsOn": ["^build"],
"outputLogs": "new-only"
},
"lint": {
"outputLogs": "new-only",
"dependsOn": ["^build", "^rebuild"]
Expand Down
Loading