myoperator-ui 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -618,14 +618,18 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
618
618
|
} else {
|
|
619
619
|
const existingCss = await fs2.readFile(globalCssPath, "utf-8");
|
|
620
620
|
if (!existingCss.includes("myOperator UI") && !existingCss.includes("--mo-background:")) {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
621
|
+
let updateCss = response.tailwindVersion === "v3";
|
|
622
|
+
if (!updateCss) {
|
|
623
|
+
spinner.stop();
|
|
624
|
+
const result = await prompts2({
|
|
625
|
+
type: "confirm",
|
|
626
|
+
name: "updateCss",
|
|
627
|
+
message: `${response.globalCss} exists. Add myOperator UI imports to the top?`,
|
|
628
|
+
initial: true
|
|
629
|
+
});
|
|
630
|
+
updateCss = result.updateCss;
|
|
631
|
+
spinner.start("Initializing project...");
|
|
632
|
+
}
|
|
629
633
|
if (updateCss) {
|
|
630
634
|
if (hasBootstrap || prefix) {
|
|
631
635
|
await fs2.writeFile(globalCssPath, cssContent + existingCss);
|
|
@@ -645,18 +649,8 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
645
649
|
} else {
|
|
646
650
|
const existingConfig = await fs2.readFile(tailwindConfigPath, "utf-8");
|
|
647
651
|
if (!existingConfig.includes("hsl(var(--destructive))") && !existingConfig.includes("hsl(var(--ring))")) {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
type: "confirm",
|
|
651
|
-
name: "updateTailwind",
|
|
652
|
-
message: `${response.tailwindConfig} exists. Update with myOperator UI theme colors?`,
|
|
653
|
-
initial: true
|
|
654
|
-
});
|
|
655
|
-
spinner.start("Initializing project...");
|
|
656
|
-
if (updateTailwind) {
|
|
657
|
-
await fs2.writeFile(tailwindConfigPath, getTailwindConfig(prefix));
|
|
658
|
-
tailwindUpdated = true;
|
|
659
|
-
}
|
|
652
|
+
await fs2.writeFile(tailwindConfigPath, getTailwindConfig(prefix));
|
|
653
|
+
tailwindUpdated = true;
|
|
660
654
|
}
|
|
661
655
|
}
|
|
662
656
|
}
|