boardui 0.1.0 → 0.2.0
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 +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -353,6 +353,7 @@ import pc2 from "picocolors";
|
|
|
353
353
|
import prompts2 from "prompts";
|
|
354
354
|
var RUNTIME_DEPS = ["react-aria-components", "tailwind-merge", "@remixicon/react"];
|
|
355
355
|
var DEV_DEPS = ["tailwindcss", "@tailwindcss/postcss"];
|
|
356
|
+
var PRO_DEPS = ["recharts", "motion", "prism-react-renderer", "@internationalized/date"];
|
|
356
357
|
var INIT_ITEMS = ["globals", "cx", "use-dismiss-on-outside-press"];
|
|
357
358
|
async function init(options) {
|
|
358
359
|
const project = readProject(process.cwd());
|
|
@@ -384,7 +385,8 @@ async function init(options) {
|
|
|
384
385
|
return;
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
|
-
const
|
|
388
|
+
const runtimeDeps = options.pro ? [...RUNTIME_DEPS, ...PRO_DEPS] : RUNTIME_DEPS;
|
|
389
|
+
const missingRuntime = runtimeDeps.filter((pkg) => !project.installedDependencies.has(pkg));
|
|
388
390
|
const missingDev = DEV_DEPS.filter((pkg) => !project.installedDependencies.has(pkg));
|
|
389
391
|
const missing = [...missingRuntime, ...missingDev];
|
|
390
392
|
if (missing.length > 0) {
|
|
@@ -470,8 +472,8 @@ Add a component with ${pc3.cyan("npx boardui add <name>")}
|
|
|
470
472
|
|
|
471
473
|
// src/index.ts
|
|
472
474
|
var program = new Command();
|
|
473
|
-
program.name("boardui").description("Add BoardUI components to your project.").version("0.
|
|
474
|
-
program.command("init").description("Set up BoardUI in an existing Next.js project (deps, theme, utils).").option("-y, --yes", "skip confirmation prompts").option("-o, --overwrite", "overwrite existing files").option("-d, --dir <dir>", "target directory (defaults to the project source root)").action(async (options) => {
|
|
475
|
+
program.name("boardui").description("Add BoardUI components to your project.").version("0.2.0", "-v, --version");
|
|
476
|
+
program.command("init").description("Set up BoardUI in an existing Next.js project (deps, theme, utils).").option("-y, --yes", "skip confirmation prompts").option("-o, --overwrite", "overwrite existing files").option("-d, --dir <dir>", "target directory (defaults to the project source root)").option("--pro", "also install the deps BoardUI Pro components use (recharts, motion, ...)").action(async (options) => {
|
|
475
477
|
await init(options);
|
|
476
478
|
});
|
|
477
479
|
program.command("add").description("Add components to your project.").argument("[components...]", "component names (run `boardui list` to see them)").option("-a, --all", "add every component in the registry").option("-p, --path <path>", "custom directory to write component files into").option("-d, --dir <dir>", "target directory (defaults to the project source root)").option("-o, --overwrite", "overwrite existing files").option("-y, --yes", "skip prompts (skips existing files, installs deps)").action(async (components, options) => {
|