Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit c2f3896

Browse files
diofeherbryanvu
authored andcommitted
Adding the ability to pass arguments in npm start to lnd command
1 parent be1b171 commit c2f3896

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

apps/desktop/main.dev.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ const processes = [
7676
},
7777
]
7878

79+
const appendArgumentsLnd = () => {
80+
processes[0].args = processes[0].args.concat(process.argv.slice(process.argv.indexOf('--') + 1))
81+
}
82+
83+
appendArgumentsLnd()
7984
runProcesses(processes, logs)
8085

8186
let intervalId

apps/desktop/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"scripts": {
1111
"package": "cross-env NODE_ENV=production node -r babel-register -r babel-polyfill scripts/package.js",
1212
"package-all": "npm run package -- --all",
13-
"start": "node scripts/startup-message.js && concurrently --kill-others \"npm run start-electron\" \"npm run start-webpack\" -n \"electron,webpack\" -p name",
14-
"start-electron": "cross-env HOT=1 NODE_ENV=development electron -r babel-register ./main.dev",
13+
"start": "f() { node scripts/startup-message.js && concurrently --kill-others \"npm run start-electron -- $*\" \"npm run start-webpack\" -n \"electron,webpack\" -p name; }; f",
14+
"start-electron": "cross-env HOT=1 NODE_ENV=development electron -r babel-register ./main.dev -- $*",
1515
"start-webpack": "cross-env NODE_ENV=development node -r babel-register scripts/dev-server.js",
1616
"install-grpc": "cd node_modules/grpc && git submodule update --init && npm run electron-build -- --target=1.4.6"
1717
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"publish": "lerna publish",
99
"clean": "lerna clean",
1010
"reinstall": "npm run clean && npm install",
11-
"start": "cd apps/desktop && npm start -s",
11+
"start": "cd apps/desktop && npm start -s --",
1212
"setup": "npm install && npm run install-grpc",
1313
"package-electron": "cd apps/desktop && npm run package",
1414
"package-all-electron": "cd apps/desktop && npm run package-all",

0 commit comments

Comments
 (0)