(config: BuildConfig)
| 4 | import { writePackageJson } from './package-json.ts'; |
| 5 | |
| 6 | export async function submoduleBuild(config: BuildConfig) { |
| 7 | const submodule = 'build'; |
| 8 | const buildSrcDtsDir = join(config.dtsDir, 'packages', 'qwik', 'src', submodule); |
| 9 | const buildDestDir = join(config.distQwikPkgDir, submodule); |
| 10 | |
| 11 | ensureDir(buildDestDir); |
| 12 | |
| 13 | bundleIndex(config, 'index'); |
| 14 | bundleIndex(config, 'index.dev'); |
| 15 | bundleIndex(config, 'index.prod'); |
| 16 | |
| 17 | console.log('🐨', submodule); |
| 18 | |
| 19 | await copyFile(join(buildSrcDtsDir, 'index.d.ts'), join(buildDestDir, 'index.d.ts')); |
| 20 | |
| 21 | const loaderPkg: PackageJSON = { |
| 22 | name: `@builder.io/qwik/build`, |
| 23 | version: config.distVersion, |
| 24 | main: `index.mjs`, |
| 25 | types: `index.d.ts`, |
| 26 | private: true, |
| 27 | type: 'module', |
| 28 | }; |
| 29 | await writePackageJson(buildDestDir, loaderPkg); |
| 30 | } |
| 31 | |
| 32 | export async function bundleIndex(config: BuildConfig, entryName: string) { |
| 33 | const submodule = 'build'; |
no test coverage detected
searching dependent graphs…