-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpackage-postinstall.js
More file actions
23 lines (21 loc) · 797 Bytes
/
package-postinstall.js
File metadata and controls
23 lines (21 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(function OLSKPostinstallHotfix() {
Object.entries(require('OLSKHotfix').OLSKHotfixPatches(process.env.NODE_ENV)).forEach(function ([path, patches]) {
if (!require('fs').existsSync(path)) {
return;
}
Object.entries(patches).forEach(function ([search, replace]) {
require('fs').writeFileSync(path, require('OLSKString').OLSKStringPatch(
require('fs').readFileSync(path, 'utf8'), search, replace));
});
});
})();
(function OLSKPostinstallExternalAssets() {
require('./node_modules/OLSKExpress/modules/OLSKAssets/main.js').OLSKAssetsCopyAssetsFromTo([
'normalize.css',
'OLSKDecor',
'OLSKRootLink',
'OLSKUIAssets',
'ROCORootLink',
'list.js',
], require('path').join(__dirname, 'node_modules'), require('path').join(__dirname, 'os-app/_shared/__external'));
})();