Add prettier as devDependency to improve development workflow

This commit is contained in:
Tw93
2025-08-16 22:44:31 +08:00
parent 6f9450d598
commit 29b7504109
9 changed files with 152 additions and 657 deletions

2
rollup.config.js vendored
View File

@@ -7,7 +7,6 @@ import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import chalk from "chalk";
import { spawn, exec } from "child_process";
import fs from "fs";
const isProduction = process.env.NODE_ENV === "production";
const devPlugins = !isProduction ? [pakeCliDevPlugin()] : [];
@@ -49,6 +48,7 @@ function pakeCliDevPlugin() {
// 智能检测包管理器
const detectPackageManager = () => {
const fs = require("fs");
if (fs.existsSync("pnpm-lock.yaml")) return "pnpm";
if (fs.existsSync("yarn.lock")) return "yarn";
return "npm";