Skip to content
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 packages/cli/src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { existsSync, promises as fs } from "node:fs";
import path from "node:path";
import process from "node:process";
import { z } from "zod/v4";
import * as p from "@clack/prompts";
import {
type DetectLanguageResult,
detectConfigs,
Expand All @@ -13,7 +14,6 @@ import { error, handleError } from "../../utils/errors.js";
import type { Config } from "../../utils/get-config.js";
import * as cliConfig from "../../utils/get-config.js";
import { cancel, intro, prettifyList } from "../../utils/prompt-helpers.js";
import * as p from "@clack/prompts";
import * as registry from "../../utils/registry/index.js";
import { resolveImport } from "../../utils/resolve-imports.js";
import { syncSvelteKit } from "../../utils/sveltekit.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/init/preflight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function checkInitDependencies(dependencies: Partial<Record<string, string>>) {
`${highlight("init")} command.\n\n` +
`You have two options:\n` +
`1. Update Tailwind CSS to v4 and try again.\n` +
`2. Use ${highlight("shadcn-svelte@1.0.0-next.9")} that supports initializing projects with Tailwind v3.\n\n` +
`2. Use ${highlight("shadcn-svelte@1.0.0-next.10")} that supports initializing projects with Tailwind v3.\n\n` +
`References:\n` +
`Tailwind v4 Guide: ${color.underline(`${SITE_BASE_URL}/docs/migration/tailwind-v4`)}\n` +
`Legacy Tailwind v3 Docs: ${color.underline(`${TW3_SITE_BASE_URL}/docs`)}\n\n`
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@ export function getTSConfig(cwd: string, tsconfigName: "tsconfig.json" | "jsconf

export function writeConfig(cwd: string, config: RawConfig): void {
const targetPath = path.resolve(cwd, "components.json");
const conf = newConfigSchema.parse(config);
const conf = newConfigSchema.parse(config, { jitless: true }); // `jitless` to retain the property order
fs.writeFileSync(targetPath, JSON.stringify(conf, null, "\t") + "\n", "utf8");
}
2 changes: 1 addition & 1 deletion packages/cli/test/utils/preflight-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe("preflightInit", () => {
`${highlight("init")} command.\n\n` +
`You have two options:\n` +
`1. Update Tailwind CSS to v4 and try again.\n` +
`2. Use ${highlight("shadcn-svelte@1.0.0-next.9")} that supports initializing projects with Tailwind v3.\n\n` +
`2. Use ${highlight("shadcn-svelte@1.0.0-next.10")} that supports initializing projects with Tailwind v3.\n\n` +
`References:\n` +
`Tailwind v4 Guide: ${color.underline(`${SITE_BASE_URL}/docs/migration/tailwind-v4`)}\n` +
`Legacy Tailwind v3 Docs: ${color.underline(`${TW3_SITE_BASE_URL}/docs`)}\n\n`
Expand Down