| 40 | ...extractAssets(toolbarAssets), |
| 41 | ]; |
| 42 | const resolveDepPath = (path: string) => { |
| 43 | const parts = path.split('/'); |
| 44 | const offset = parts[0].startsWith('@') ? 1 : 0; |
| 45 | parts[offset] = parts[offset].split('@')[0]; |
| 46 | path = parts.join('/'); |
| 47 | if (path.startsWith('d3')) { |
| 48 | path = 'markmap-view/node_modules/' + path; |
| 49 | } else if (!path.startsWith('markmap-')) { |
| 50 | path = 'markmap-lib/node_modules/' + path; |
| 51 | } |
| 52 | return resolve('..', path); |
| 53 | }; |
| 54 | await Promise.all( |
| 55 | paths.map(async (path) => { |
| 56 | const fullPath = resolve(assetsDir, path); |