From d061348ec8d54ce76f3ab6cabbf3796539a89084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 3 Dec 2018 19:28:25 +0100 Subject: [PATCH] Use npm: prefixes to DRY package.json @appinteractive and @Mastercuber have a look, I guess this feature of concurrently is new to you: https://www.npmjs.com/package/concurrently#usage For some reason, concurrently hangs when run with docker-compose. I haven't figured out how to fix this. Run locally, everything terminates as expected. --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a191ee27c..7ed758717 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,11 @@ "test": "echo \"Error: no test specified\" && exit 0", "start": "./node_modules/.bin/nodemon --exec babel-node src/index.js", "start:debug": "./node_modules/.bin/nodemon --exec babel-node --inspect=0.0.0.0:9229 src/index.js", - "db:seed": "concurrently --kill-others --success first 'cross-env GRAPHQL_URI=http://localhost:4001 PERMISSIONS=disabled GRAPHQL_PORT=4001 yarn run start' 'wait-on tcp:4001 && cross-env GRAPHQL_URI=http://localhost:4001 ./node_modules/.bin/babel-node src/seed/seed-db.js'", - "db:reset": "concurrently --kill-others --success first 'cross-env GRAPHQL_URI=http://localhost:4001 PERMISSIONS=disabled GRAPHQL_PORT=4001 yarn run start' 'wait-on tcp:4001 && cross-env GRAPHQL_URI=http://localhost:4001 ./node_modules/.bin/babel-node src/seed/unseed-db.js'" + "db:backdoor": "cross-env GRAPHQL_URI=http://localhost:4001 PERMISSIONS=disabled GRAPHQL_PORT=4001 yarn run start", + "db:script:seed": "wait-on tcp:4001 && cross-env GRAPHQL_URI=http://localhost:4001 ./node_modules/.bin/babel-node src/seed/seed-db.js", + "db:script:reset": "wait-on tcp:4001 && cross-env GRAPHQL_URI=http://localhost:4001 ./node_modules/.bin/babel-node src/seed/unseed-db.js", + "db:seed": "concurrently --kill-others --success first -n backdoor,seed \"yarn run db:backdoor\" \"yarn run db:script:seed\"", + "db:reset": "concurrently --kill-others --success first -n backdoor,reset \"yarn run db:backdoor\" \"yarn run db:script:reset\"" }, "author": "Human Connection gGmbH", "license": "MIT",