MCPcopy Index your code
hub / github.com/QwikDev/qwik / bundleCreateQwikCli

Function bundleCreateQwikCli

scripts/create-qwik-cli.ts:32–70  ·  view source on GitHub ↗
(config: BuildConfig, srcCliDir: string, distCliDir: string)

Source from the content-addressed store, hash-verified

30}
31
32async function bundleCreateQwikCli(config: BuildConfig, srcCliDir: string, distCliDir: string) {
33 emptyDir(distCliDir);
34
35 await build({
36 entryPoints: [join(srcCliDir, 'index.ts')],
37 outfile: join(distCliDir, 'index.cjs'),
38 target: nodeTarget,
39 platform: 'node',
40 format: 'cjs',
41 bundle: true,
42 sourcemap: false,
43 minify: !config.dev,
44 plugins: [
45 {
46 name: 'colorAlias',
47 setup(build) {
48 build.onResolve({ filter: /^chalk$/ }, async (args) => {
49 const result = await build.resolve('kleur', {
50 resolveDir: args.resolveDir,
51 kind: 'import-statement',
52 });
53 if (result.errors.length > 0) {
54 return { errors: result.errors };
55 }
56 return { path: result.path };
57 });
58 },
59 },
60 ],
61 external: ['prettier', 'typescript', 'ts-morph', 'semver', 'ignore'],
62 define: {
63 'globalThis.CODE_MOD': 'false',
64 'globalThis.QWIK_VERSION': JSON.stringify(config.distVersion),
65 },
66 banner: {
67 js: getBanner(PACKAGE, config.distVersion),
68 },
69 });
70}
71
72export async function publishCreateQwikCli(
73 config: BuildConfig,

Callers 1

buildCreateQwikCliFunction · 0.85

Calls 4

emptyDirFunction · 0.90
getBannerFunction · 0.90
joinFunction · 0.85
buildFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…