Skip to content

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

@azat-io

Description

@azat-io

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions