-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/qa-stable' into prod-stable
- Loading branch information
Showing
63 changed files
with
2,309 additions
and
1,679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Javascript builds | ||
node_modules | ||
public | ||
dist | ||
.DS_Store | ||
coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,5 +48,6 @@ node_modules/ | |
.env | ||
|
||
public/ | ||
dist/ | ||
.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* eslint-disable no-console */ | ||
const inquirer = require('inquirer'); | ||
const { resolve } = require('path'); | ||
const { spawn } = require('child_process'); | ||
|
||
async function setEnv() { | ||
return inquirer | ||
.prompt([ | ||
{ type: 'list', name: 'uiEnv', message: 'Which UI environment you want to use?', choices: ['beta', 'stable'] }, | ||
{ | ||
type: 'list', | ||
name: 'clouddotEnv', | ||
message: 'Which platform environment you want to use', | ||
choices: ['ci', 'qa', 'prod'], | ||
}, | ||
{ | ||
name: 'insightsProxy', | ||
message: 'Do you want to use the Insights proxy?', | ||
type: 'confirm', | ||
default: false, | ||
}, | ||
// { | ||
// name: 'localApi', | ||
// message: 'Do you want to use local api?', | ||
// type: 'confirm', | ||
// default: false, | ||
// }, | ||
]) | ||
.then(answers => { | ||
const { uiEnv, clouddotEnv, insightsProxy, localApi } = answers; | ||
|
||
process.env.BETA_ENV = uiEnv === 'beta' ? 'true' : 'false'; | ||
process.env.CLOUDOT_ENV = clouddotEnv; | ||
process.env.USE_PROXY = (!insightsProxy).toString(); // Set 'true' for webpack proxy | ||
// process.env.USE_LOCAL_ROUTES = localApi.toString(); | ||
}); | ||
} | ||
|
||
async function run() { | ||
await setEnv(); | ||
const child = spawn('yarn', ['start:dev'], { | ||
stdio: [process.stdout, process.stdout, process.stdout], | ||
cwd: resolve(__dirname, '../'), | ||
}); | ||
} | ||
|
||
try { | ||
run(); | ||
} catch (error) { | ||
console.error(error); | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.