Skip to content

Commit

Permalink
fix broken companion dev #3473
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Feb 17, 2022
1 parent c744ab9 commit 57f6c78
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions bin/companion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require('dotenv').config({ path: '.env.local' })
require('../packages/@uppy/companion/src/standalone/start-server')
6 changes: 1 addition & 5 deletions bin/companion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

# Load local env vars. In CI, these are injected.
if [ -f .env.local ]; then
# https://gist.github.com/mihow/9c7f559807069a03e302605691f85572?permalink_comment_id=3625310#gistcomment-3625310
set -a
source <(sed -e '/^#/d;/^\s*$/d' -e "s/'/'\\\''/g" -e "s/=\(.*\)/='\1'/g" .env.local)
set +a
nodemon --watch packages/@uppy/companion/src --exec node ./packages/@uppy/companion/src/standalone/start-server.js
nodemon --watch packages/@uppy/companion/src ./bin/companion.js
else
env \
COMPANION_DATADIR="./output" \
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"core-js": "~3.19.3",
"cssnano": "^5.0.6",
"dedent": "^0.7.0",
"dotenv": "^16.0.0",
"esbuild": "^0.14.1",
"esbuild-plugin-babel": "^0.2.3",
"eslint": "^8.0.0",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8538,6 +8538,7 @@ __metadata:
core-js: ~3.19.3
cssnano: ^5.0.6
dedent: ^0.7.0
dotenv: ^16.0.0
esbuild: ^0.14.1
esbuild-plugin-babel: ^0.2.3
eslint: ^8.0.0
Expand Down Expand Up @@ -16869,6 +16870,13 @@ __metadata:
languageName: node
linkType: hard

"dotenv@npm:^16.0.0":
version: 16.0.0
resolution: "dotenv@npm:16.0.0"
checksum: 664cebb51f0a9a1d1b930f51f0271e72e26d62feaecc9dc03df39453dd494b4e724809ca480fb3ec3213382b1ed3f791aaeb83569a137f9329ce58efd4853dbf
languageName: node
linkType: hard

"dotenv@npm:^7.0.0":
version: 7.0.0
resolution: "dotenv@npm:7.0.0"
Expand Down

0 comments on commit 57f6c78

Please sign in to comment.