Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): always have qwik binary available #7004

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"build.watch": "tsm scripts/index.ts --build --qwikcity --watch --dev --platform-binding",
"change": "changeset",
"cli": "pnpm build.cli && node packages/create-qwik/dist/create-qwik.cjs && tsm scripts/validate-cli.ts --copy-local-qwik-dist",
"cli.qwik": "pnpm build.cli && node packages/qwik/dist/qwik-cli.cjs",
"cli.qwik": "pnpm build.cli && packages/qwik/qwik-cli.cjs",
"cli.validate": "tsm scripts/validate-cli.ts",
"deps": "corepack pnpm upgrade -i -r --latest && syncpack fix-mismatches && corepack pnpm dedupe",
"docs.dev": "cd packages/docs && pnpm build.repl-sw && pnpm dev",
Expand Down
5 changes: 3 additions & 2 deletions packages/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "1.9.1",
"annotation": "This package.json is for internal use in the monorepo, the build actually makes a new package.json for the published package via scripts/package-json.ts",
"bin": {
"qwik": "./dist/qwik-cli.cjs"
"qwik": "./qwik-cli.cjs"
},
"bugs": "https://github.com/QwikDev/qwik/issues",
"contributors": [
Expand Down Expand Up @@ -137,7 +137,8 @@
"loader.d.ts",
"optimizer.d.ts",
"server.d.ts",
"testing.d.ts"
"testing.d.ts",
"qwik-cli.cjs"
],
"homepage": "https://qwik.dev/",
"keywords": [
Expand Down
7 changes: 1 addition & 6 deletions scripts/submodule-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { build } from 'esbuild';
import { existsSync, rmSync } from 'node:fs';
import { join } from 'node:path';
import { copyStartersDir } from './create-qwik-cli';
import { type BuildConfig, copyDir, copyFile, getBanner, nodeTarget } from './util';
import { type BuildConfig, copyDir, getBanner, nodeTarget } from './util';

/** Builds @builder.io/qwik/cli */
export async function submoduleCli(config: BuildConfig) {
Expand Down Expand Up @@ -42,11 +42,6 @@ export async function submoduleCli(config: BuildConfig) {
},
});

await copyFile(
join(config.srcQwikDir, submodule, 'qwik.cjs'),
join(config.distQwikPkgDir, 'qwik-cli.cjs')
);

await copyStartersDir(config, config.distQwikPkgDir, ['features', 'adapters']);

const tmplSrc = join(config.startersDir, 'templates');
Expand Down