-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpostinstall.config.js
More file actions
25 lines (20 loc) · 767 Bytes
/
Copy pathpostinstall.config.js
File metadata and controls
25 lines (20 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const fs = require('fs');
const f_angular = 'extra-webpack.config.js';
const regex = /\/\/ start of extra configs([\S\s]+)\/\/ end of extra configs/;
module.exports.getConfigs = function() {
return new Promise((resolve, reject) => {
fs.readFile(f_angular, 'utf8', function(err, data) {
if (err) {
console.log(err);
reject(err);
}
var extra = data.match(regex)[1].replace("__dirname", __dirname);
const electronConfig = 'target: "electron-renderer", ' + extra + ',';
const webConfig = 'target: "web", ' + extra + ',';
resolve({
electronConfig,
webConfig
})
});
});
};