Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[✨] Add ability to set build.client, build.types and build.preview command #28

Closed
azat-io opened this issue Aug 2, 2024 · 3 comments
Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation

Comments

@azat-io
Copy link

azat-io commented Aug 2, 2024

Is your feature request related to a problem?

Hello!

I have a project that contains some library code, and I also have documentation for the project stored in the same repository.

I use the "build" command to build the library, not the documentation.

Currently, my scripts look like this:

{
  "scripts": {
    "docs:dev": "vite --open --mode ssr --config vite.config.docs.ts",
    "docs:build": "qwik build",
    "build.client": "vite build --config vite.config.docs.ts",
    "build.types": "tsc --incremental --noEmit",
    "docs:debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
    "docs:preview": "qwik build preview && vite preview --open --config vite.config.docs.ts",
    "test:format": "prettier --check \"**/*.{js,ts,jsx,tsx,css,json,md,yml}\"",
    "test:css": "stylelint **/*.css",
    "test:js": "eslint \"**/*.{js,ts,tsx}\"",
    "test:types": "tsc --noEmit --pretty",
    "test:unit": "vitest --run --coverage",
    "test": "pnpm run /^test:/"
  }
}

Thus, anything that refers to documentation in scripts starts with the prefix "docs:".

I would like to be able to define script names for the client build and types myself.

Describe the solution you'd like

{
    "docs:build": "qwik build --client-script docs:build:client --types-script docs:build:types",
    "docs:build:client": "vite build --config vite.config.docs.ts",
    "docs:build:types": "tsc --incremental --noEmit",

    "docs:preview": "qwik build preview --client-script docs:build:client --types-script docs:build:types --preview-script docs:build:preview && vite preview --open --config vite.config.docs.ts",
    "docs:build:preview": "vite build --ssr src/entry.preview.tsx",
}

Describe alternatives you've considered

N/A.

Additional context

No response

@azat-io azat-io changed the title [✨] Add ability to set build.client and build.types command [✨] Add ability to set build.client, build.types and build.preview command Aug 2, 2024
@wmertens
Copy link
Member

wmertens commented Aug 3, 2024

Yes sounds good. PR welcome, the code is under qwik/src/cli/

@thasmo
Copy link

thasmo commented Aug 3, 2024

It would be nice if build scripts can be run independently so it can be even more flexible; i.e. other tools (e.g. turborepo, etc.) can be used to control the build cycle.

qwik build-client, qwik build-types or similar.

@azat-io
Copy link
Author

azat-io commented Aug 4, 2024

I made a temporary solution that allows you to set the command name:
QwikDev/qwik#6758

@gioboa gioboa transferred this issue from QwikDev/qwik Oct 11, 2024
@github-actions github-actions bot added [STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation labels Oct 11, 2024
@QwikDev QwikDev locked and limited conversation to collaborators Oct 11, 2024
@gioboa gioboa converted this issue into discussion #29 Oct 11, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Projects
None yet
Development

No branches or pull requests

3 participants