0.0.5 • Published 12 days ago

@qwikdev/create-astro v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

Create @qwikdev/astro 🎉

Scaffolding for QwikDev/astro projects

🛠️ CLI

  • With NPM:

    npm create @qwikdev/astro@latest [project] [adapter] [...options]
  • With Yarn:

    yarn create @qwikdev/astro [project] [adapter] [...options]
  • With PNPM:

    pnpm create @qwikdev/astro [project] [adapter] [...options]
  • With Bun:

    bun create @qwikdev/astro [project] [adapter] [...options]

    The create @qwikdev/astro command runs interactively without any arguments or options.

    However, it is possible to use the interactive mode as described below:

    Types of arguments:

    NameTypeDefault valueDescription
    projectString./qwik-astro-appDirectory of the project.
    adapter"deno" or "node"nodeServer adapter.

    Types of options:

    NameDescription
    --help (-h)Display available flags.
    --itExecute actions interactively.
    --dry-runWalk through steps without executing.
    --force / --no-force (-f / --no-f)Overwrite target directory if it exists.
    --install / --no-install (-i / --no-i)Install dependencies.
    --biome / --no-biomePrefer Biome to ESLint/Prettier.
    --git / --no-gitInitialize Git repository.
    --ci / --no-ciAdd CI workflow.
    --yes (-y)Skip all prompts by accepting defaults.
    --no (-n)Skip all prompts by declining defaults.

📦 API

  • Use the arguments provided in the command line:

    import createQwikAstro from '@qwikdev/create-astro';
    
    createQwikAstro();
  • Specify the command line arguments to use:

    import { runCreate } from '@qwikdev/create-astro';
    
    runCreate("./qwik-astro-app", "node", "--it");
  • Pass the arguments to create a new project:

    import { createProject } from '@qwikdev/create-astro';
    
    const config = {
      project: "./qwik-astro-app",
      starter: "node",
      it: false,
    };
    
    createProject(config);

    Project configuration type:

    export type ProjectConfig = {
      project: string;
      adapter?: "deno" | "node";
      force?: boolean;
      install?: boolean;
      biome?: boolean;
      git?: boolean;
      ci?: boolean;
      yes: boolean;
      no: boolean;
      it: boolean;
      dryRun: boolean;
    };

🌍 Community

🔗 Related