@nikala-ui/cli 0.9.2 ā 0.9.4
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/commands/init.js
CHANGED
|
@@ -72,7 +72,7 @@ export async function init(options) {
|
|
|
72
72
|
await fs.ensureDir(utilsPath);
|
|
73
73
|
// 1. Install required packages
|
|
74
74
|
const userPkgPath = path.join(cwd, "package.json");
|
|
75
|
-
const requiredDeps = ["clsx", "tailwind-merge", "class-variance-authority"
|
|
75
|
+
const requiredDeps = ["clsx", "tailwind-merge", "class-variance-authority"];
|
|
76
76
|
if (await fs.pathExists(userPkgPath)) {
|
|
77
77
|
try {
|
|
78
78
|
const userPkg = await fs.readJson(userPkgPath);
|
|
@@ -109,6 +109,7 @@ export async function init(options) {
|
|
|
109
109
|
alias: {
|
|
110
110
|
components: config.componentsDir,
|
|
111
111
|
utils: config.utilsDir,
|
|
112
|
+
hooks: "src/hooks",
|
|
112
113
|
},
|
|
113
114
|
});
|
|
114
115
|
console.log(pc.green("ā Created nikala.config.json"));
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import { add } from "./commands/add.js";
|
|
|
6
6
|
import { themeCommand } from "./commands/theme.js";
|
|
7
7
|
import { validateCommand } from "./commands/validate.js";
|
|
8
8
|
import { diffCommand } from "./commands/diff.js";
|
|
9
|
-
console.log(`\nšØ ${pc.bold(pc.red("Nikala UI"))} ${pc.dim("v0.9.
|
|
9
|
+
console.log(`\nšØ ${pc.bold(pc.red("Nikala UI"))} ${pc.dim("v0.9.4")} ā SolidJS + Tailwind v4 components`);
|
|
10
10
|
console.log(` ${pc.italic(pc.dim("Honoring Niko Pirosmani (Nikala)"))}\n`);
|
|
11
11
|
console.log(` ${pc.dim("Docs:")} ${pc.underline(pc.cyan("https://nikala.magradze.dev"))}\n`);
|
|
12
12
|
const program = new Command();
|
|
13
13
|
program
|
|
14
14
|
.name("nikala")
|
|
15
15
|
.description("Nikala UI ā SolidJS + Tailwind v4 components")
|
|
16
|
-
.version("0.9.
|
|
16
|
+
.version("0.9.4");
|
|
17
17
|
program
|
|
18
18
|
.command("init")
|
|
19
19
|
.description("Initialize Nikala UI in your project")
|
|
@@ -16,6 +16,11 @@ export async function writeComponentFiles(cwd, item, componentsDir, overwrite =
|
|
|
16
16
|
const relativePath = file.path.replace(/^ui\//, "");
|
|
17
17
|
targetFilePath = path.join(componentsDir, relativePath);
|
|
18
18
|
}
|
|
19
|
+
else if (file.path.startsWith("hooks/")) {
|
|
20
|
+
const relativePath = file.path.replace(/^hooks\//, "");
|
|
21
|
+
const hooksDir = path.resolve(cwd, "src/hooks");
|
|
22
|
+
targetFilePath = path.join(hooksDir, relativePath);
|
|
23
|
+
}
|
|
19
24
|
else {
|
|
20
25
|
targetFilePath = path.resolve(cwd, "src", file.path);
|
|
21
26
|
}
|