-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpackage-postinstall.js
More file actions
36 lines (34 loc) · 1.28 KB
/
package-postinstall.js
File metadata and controls
36 lines (34 loc) · 1.28 KB
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
26
27
28
29
30
31
32
33
34
35
36
(function OLSKPostinstallHotfix() {
Object.entries(Object.assign(require('OLSKHotfix').OLSKHotfixPatches(process.env.NODE_ENV), {
'./node_modules/OLSKAppToolbar/node_modules/OLSKReloadButton/main.svelte': {
"from '../OLSKUIAssets/_OLSKSharedReload.svg'": "from '../../../OLSKUIAssets/_OLSKSharedReload.svg'",
},
'./node_modules/OLSKNarrow/node_modules/OLSKInputWrapper/main.svelte': {
"from '../OLSKUIAssets/_OLSKInputClear.svg'": "from '../../../OLSKUIAssets/_OLSKInputClear.svg'",
},
})).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([
'codemirror',
'jszip',
'launchlet',
'normalize.css',
'OLSKInternational',
'OLSKLanguageSwitcher',
'OLSKDecor',
'OLSKRootLink',
'OLSKRouting',
'OLSKServiceWorker',
'OLSKUIAssets',
'ROCORootLink',
], require('path').join(__dirname, 'node_modules'), require('path').join(__dirname, 'os-app/_shared/__external'));
})();