feat(cli): add ultracite, oxlint, fumadocs addons (#427)

This commit is contained in:
Aman Varshney
2025-07-29 00:13:51 +05:30
committed by GitHub
parent 82a4f42eca
commit 216c242f7d
66 changed files with 794 additions and 251 deletions

View File

@@ -7,7 +7,7 @@ export const addPackageDependency = async (opts: {
dependencies?: AvailableDependencies[];
devDependencies?: AvailableDependencies[];
projectDir: string;
}): Promise<void> => {
}) => {
const { dependencies = [], devDependencies = [], projectDir } = opts;
const pkgJsonPath = path.join(projectDir, "package.json");

View File

@@ -6,9 +6,7 @@ import { isTelemetryEnabled } from "./telemetry";
const POSTHOG_API_KEY = process.env.POSTHOG_API_KEY || "";
const POSTHOG_HOST = process.env.POSTHOG_HOST;
export async function trackProjectCreation(
config: ProjectConfig,
): Promise<void> {
export async function trackProjectCreation(config: ProjectConfig) {
const posthog = new PostHog(POSTHOG_API_KEY, {
host: POSTHOG_HOST,
flushAt: 1,

View File

@@ -6,9 +6,7 @@ import { getLatestCLIVersion } from "./get-latest-cli-version";
const BTS_CONFIG_FILE = "bts.jsonc";
export async function writeBtsConfig(
projectConfig: ProjectConfig,
): Promise<void> {
export async function writeBtsConfig(projectConfig: ProjectConfig) {
const btsConfig: BetterTStackConfig = {
version: getLatestCLIVersion(),
createdAt: new Date().toISOString(),
@@ -94,7 +92,7 @@ export async function readBtsConfig(
export async function updateBtsConfig(
projectDir: string,
updates: Partial<Pick<BetterTStackConfig, "addons" | "webDeploy">>,
): Promise<void> {
) {
try {
const configPath = path.join(projectDir, BTS_CONFIG_FILE);

View File

@@ -1,7 +1,7 @@
import { log } from "@clack/prompts";
import { execa } from "execa";
export async function openUrl(url: string): Promise<void> {
export async function openUrl(url: string) {
const platform = process.platform;
let command: string;
let args: string[] = [];

View File

@@ -34,7 +34,7 @@ export async function fetchSponsors(
return sponsors;
}
export function displaySponsors(sponsors: SponsorEntry[]): void {
export function displaySponsors(sponsors: SponsorEntry[]) {
if (sponsors.length === 0) {
log.info("No sponsors found. You can be the first one! ✨");
outro(

View File

@@ -14,7 +14,7 @@ export async function processTemplate(
srcPath: string,
destPath: string,
context: ProjectConfig,
): Promise<void> {
) {
try {
const templateContent = await fs.readFile(srcPath, "utf-8");
const template = handlebars.compile(templateContent);