Extract cli variables

fix-debugger
ioedeveloper 4 years ago
parent 1af1b7a9d5
commit 25bad3ebc1
  1. 9
      apps/remix-ide-e2e/script.js
  2. 2
      workspace.json

@ -0,0 +1,9 @@
/* eslint-disable */
// TEST_SCRIPT='node_modules/.bin/nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js'; if [ {args.env} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' --env {args.env}'; else TEST_SCRIPT=${TEST_SCRIPT}' --env chrome'; fi; if [ {args.filePath} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' {args.filePath}'; fi; eval $TEST_SCRIPT;
const commands = process.argv
let filePath = '', env = ''
commands.forEach(val => {
if (val.indexOf('--filePath') !== -1) filePath = val.split('=')[1]
else if (val.indexOf('--env') !== -1) env = val.split('=')[1]
})

@ -112,7 +112,7 @@
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
"TEST_SCRIPT='node_modules/.bin/nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js'; if [ {args.env} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' --env {args.env}'; else TEST_SCRIPT=${TEST_SCRIPT}' --env chrome'; fi; if [ {args.filePath} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' {args.filePath}'; fi; eval $TEST_SCRIPT;"
"node apps/remix-ide-e2e/script.js"
],
"parallel": false
}

Loading…
Cancel
Save