Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shadcn-ui

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shadcn-ui - npm Package Compare versions

Comparing version 0.0.0-beta.0500a3f to 0.0.0-beta.1890b47

126

dist/index.js

@@ -71,3 +71,4 @@ #!/usr/bin/env node

alias: null,
srcDir: false
srcDir: false,
appDir: false
};

@@ -81,3 +82,4 @@ try {

alias,
srcDir: existsSync(path2.resolve("./src"))
srcDir: existsSync(path2.resolve("./src")),
appDir: existsSync(path2.resolve("./app")) || existsSync(path2.resolve("./src/app"))
};

@@ -207,2 +209,77 @@ } catch (error) {

`;
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")],
}`;

@@ -228,3 +305,3 @@ // src/index.ts

);
program.command("init").description("Configure your Next.js project.").action(async () => {
program.command("init").description("Configure your Next.js project.").option("-y, --yes", "Skip confirmation prompt.").action(async (options) => {
logger.warn(

@@ -241,13 +318,15 @@ "Running the following command will overwrite existing files."

logger.warn(
"If you don't have these, follow the steps in the documentation at https://ui.shadcn.com/docs/installation."
"If you don't have these, follow the manual steps at https://ui.shadcn.com/docs/installation."
);
logger.warn("");
const { proceed } = await prompts({
type: "confirm",
name: "proceed",
message: "Running this command will install dependencies and overwrite files. Proceed?",
initial: true
});
if (!proceed) {
process.exit(0);
if (!options.yes) {
const { proceed } = await prompts({
type: "confirm",
name: "proceed",
message: "Running this command will install dependencies and overwrite files. Proceed?",
initial: true
});
if (!proceed) {
process.exit(0);
}
}

@@ -257,11 +336,16 @@ const dependenciesSpinner = ora(`Installing dependencies...`).start();

packageManager === "npm" ? "install" : "add",
PROJECT_DEPENDENCIES.join(" ")
...PROJECT_DEPENDENCIES
]);
dependenciesSpinner.succeed();
const stylesDir = projectInfo?.srcDir ? "./src/styles" : "./styles";
if (!existsSync2(path3.resolve(stylesDir))) {
await fs3.mkdir(path3.resolve(stylesDir), { recursive: true });
if (!projectInfo?.appDir) {
const stylesDir = projectInfo?.srcDir ? "./src/styles" : "./styles";
if (!existsSync2(path3.resolve(stylesDir))) {
await fs3.mkdir(path3.resolve(stylesDir), { recursive: true });
}
}
const stylesDestination = projectInfo?.srcDir ? "./src/styles/global.css" : "./styles/global.css";
const stylesSpinner = ora(`Updating ${stylesDestination}...`).start();
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(`Adding styles with CSS variables...`).start();
await fs3.writeFile(stylesDestination, STYLES, "utf8");

@@ -274,5 +358,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();
});

@@ -279,0 +367,0 @@ program.command("add").description("add components to your project").argument("[components...]", "name of components").action(async (components) => {

3

package.json
{
"name": "shadcn-ui",
"version": "0.0.0-beta.0500a3f",
"version": "0.0.0-beta.1890b47",
"description": "Add components to your apps.",

@@ -39,3 +39,2 @@ "publishConfig": {

"prompts": "^2.4.2",
"react-day-picker": "^8.6.0",
"zod": "^3.20.2"

@@ -42,0 +41,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc