Comparing version 0.0.0-beta.6bc277c to 0.0.0-beta.6eacaca
@@ -207,2 +207,77 @@ #!/usr/bin/env node | ||
`; | ||
var TAILWIND_CONFIG = `/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
darkMode: ["class"], | ||
content: [ | ||
'./pages/**/*.{ts,tsx}', | ||
'./components/**/*.{ts,tsx}', | ||
'./app/**/*.{ts,tsx}', | ||
], | ||
theme: { | ||
container: { | ||
center: true, | ||
padding: "2rem", | ||
screens: { | ||
"2xl": "1400px", | ||
}, | ||
}, | ||
extend: { | ||
colors: { | ||
border: "hsl(var(--border))", | ||
input: "hsl(var(--input))", | ||
ring: "hsl(var(--ring))", | ||
background: "hsl(var(--background))", | ||
foreground: "hsl(var(--foreground))", | ||
primary: { | ||
DEFAULT: "hsl(var(--primary))", | ||
foreground: "hsl(var(--primary-foreground))", | ||
}, | ||
secondary: { | ||
DEFAULT: "hsl(var(--secondary))", | ||
foreground: "hsl(var(--secondary-foreground))", | ||
}, | ||
destructive: { | ||
DEFAULT: "hsl(var(--destructive))", | ||
foreground: "hsl(var(--destructive-foreground))", | ||
}, | ||
muted: { | ||
DEFAULT: "hsl(var(--muted))", | ||
foreground: "hsl(var(--muted-foreground))", | ||
}, | ||
accent: { | ||
DEFAULT: "hsl(var(--accent))", | ||
foreground: "hsl(var(--accent-foreground))", | ||
}, | ||
popover: { | ||
DEFAULT: "hsl(var(--popover))", | ||
foreground: "hsl(var(--popover-foreground))", | ||
}, | ||
card: { | ||
DEFAULT: "hsl(var(--card))", | ||
foreground: "hsl(var(--card-foreground))", | ||
}, | ||
}, | ||
borderRadius: { | ||
lg: "var(--radius)", | ||
md: "calc(var(--radius) - 2px)", | ||
sm: "calc(var(--radius) - 4px)", | ||
}, | ||
keyframes: { | ||
"accordion-down": { | ||
from: { height: 0 }, | ||
to: { height: "var(--radix-accordion-content-height)" }, | ||
}, | ||
"accordion-up": { | ||
from: { height: "var(--radix-accordion-content-height)" }, | ||
to: { height: 0 }, | ||
}, | ||
}, | ||
animation: { | ||
"accordion-down": "accordion-down 0.2s ease-out", | ||
"accordion-up": "accordion-up 0.2s ease-out", | ||
}, | ||
}, | ||
}, | ||
plugins: [require("tailwindcss-animate")], | ||
}`; | ||
@@ -266,7 +341,7 @@ // src/index.ts | ||
} | ||
let stylesDestination = projectInfo?.srcDir ? "./src/styles/global.css" : "./styles/global.css"; | ||
let stylesDestination = projectInfo?.srcDir ? "./src/styles/globals.css" : "./styles/globals.css"; | ||
if (projectInfo?.appDir) { | ||
stylesDestination = projectInfo?.srcDir ? "./src/app/globals.css" : "./app/globals.css"; | ||
} | ||
const stylesSpinner = ora(`Updating ${stylesDestination}...`).start(); | ||
const stylesSpinner = ora(`Adding styles with CSS variables...`).start(); | ||
await fs3.writeFile(stylesDestination, STYLES, "utf8"); | ||
@@ -279,5 +354,9 @@ stylesSpinner.succeed(); | ||
const utilsDestination = projectInfo?.srcDir ? "./src/lib/utils.ts" : "./lib/utils.ts"; | ||
const utilsSpinner = ora(`Creating ${utilsDestination}...`).start(); | ||
const utilsSpinner = ora(`Adding utils...`).start(); | ||
await fs3.writeFile(utilsDestination, UTILS, "utf8"); | ||
utilsSpinner.succeed(); | ||
const tailwindDestination = "./tailwind.config.js"; | ||
const tailwindSpinner = ora(`Updating tailwind.config.js...`).start(); | ||
await fs3.writeFile(tailwindDestination, TAILWIND_CONFIG, "utf8"); | ||
tailwindSpinner.succeed(); | ||
}); | ||
@@ -329,6 +408,5 @@ program.command("add").description("add components to your project").argument("[components...]", "name of components").action(async (components) => { | ||
if (component.dependencies?.length) { | ||
const dependencies = component.dependencies.join(" "); | ||
await execa(packageManager, [ | ||
packageManager === "npm" ? "install" : "add", | ||
dependencies | ||
...component.dependencies | ||
]); | ||
@@ -335,0 +413,0 @@ } |
{ | ||
"name": "shadcn-ui", | ||
"version": "0.0.0-beta.6bc277c", | ||
"version": "0.0.0-beta.6eacaca", | ||
"description": "Add components to your apps.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36563
409
1
2