mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* use replace js * Update app-config-replace.js * update replace * update replace * fix folder
22 lines
780 B
JavaScript
22 lines
780 B
JavaScript
// Protractor configuration file, see link for more information
|
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
|
|
require('dotenv').config({ path: process.env.ENV_FILE });
|
|
const fs = require('fs');
|
|
|
|
const PROXY_HOST_ADF = process.env.PROXY_HOST_ADF;
|
|
const NOTIFICATION_LAST = process.env.NOTIFICATION_LAST || 8000;
|
|
|
|
const configPath = './demo-shell/dist/app.config.json';
|
|
|
|
fs.readFile(configPath, (err, appConfigString) => {
|
|
if (err) throw err;
|
|
let appConfig = JSON.parse(appConfigString);
|
|
appConfig.bpmHost = PROXY_HOST_ADF;
|
|
appConfig.ecmHost = PROXY_HOST_ADF;
|
|
appConfig.notificationDefaultDuration = NOTIFICATION_LAST;
|
|
|
|
let appConfigReplacedJson = JSON.stringify(appConfig);
|
|
fs.writeFileSync(configPath, appConfigReplacedJson);
|
|
});
|