json-crud-ui-components 1.5.3 → 1.7.2
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/bin/cli.js +1 -1
- package/bin/v6/commands/init/steps/checks.js +21 -0
- package/bin/v6/commands/init/steps/resolveFolderName.js +14 -0
- package/bin/v6/commands/init.js +77 -0
- package/bin/v7/commands/init/steps/checks.js +21 -0
- package/bin/v7/commands/init/steps/resolveFolderName.js +14 -0
- package/bin/v7/commands/init/template/v5/index.html +48 -0
- package/bin/v7/commands/init/template/v5/tailwindcss-3.4.17.css +83 -0
- package/bin/v7/commands/init.js +75 -0
- package/bin/v7/commands/initHtml/steps/announce.js +3 -0
- package/bin/v7/commands/initHtml/steps/checks.js +18 -0
- package/bin/v7/commands/initHtml/steps/createProject.js +5 -0
- package/bin/v7/commands/initHtml/steps/locateDestination.js +5 -0
- package/bin/v7/commands/initHtml/steps/locateSource.js +32 -0
- package/bin/v7/commands/initHtml/template/v5/index.html +48 -0
- package/bin/v7/commands/initHtml/template/v5/tailwindcss-3.4.17.css +83 -0
- package/bin/v7/commands/initHtml.js +24 -0
- package/bin/v7/commands/initJs/steps/announce.js +3 -0
- package/bin/v7/commands/initJs/steps/createProject.js +7 -0
- package/bin/v7/commands/initJs/steps/locateDestination.js +5 -0
- package/bin/v7/commands/initJs/steps/locateSource.js +32 -0
- package/bin/{v5/commands/init.js → v7/commands/initJs.js} +6 -6
- package/bin/v7/core/getAllVersions.js +12 -0
- package/bin/v7/core/showUsage.js +41 -0
- package/bin/{v4 → v7}/start.js +2 -0
- package/package.json +1 -1
- package/bin/v4/commands/init.js +0 -25
- package/bin/v4/core/showUsage.js +0 -49
- package/bin/v5/commands/initJs/steps/checks.js +0 -23
- /package/bin/{v4 → v6}/commands/addListeners/steps/announce.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/steps/checks.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/steps/createProject.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/steps/locateDestination.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/steps/locateSource.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/steps/resolveFolderName.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners/template/v2/hookAllListeners.js +0 -0
- /package/bin/{v4 → v6}/commands/addListeners.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/steps/announce.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/steps/createProject.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/steps/locateDestination.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/steps/locateSource.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/steps/resolveFolderName.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader/template/v1/buildHeader.js +0 -0
- /package/bin/{v4 → v6}/commands/buildHeader.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/announce.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/checks.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/createProject.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/locateDestination.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/locateSource.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/steps/resolveFolderName.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/template/v1/clickFunc.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick/template/v1/start.js +0 -0
- /package/bin/{v4 → v6}/commands/htmlIdClick.js +0 -0
- /package/bin/{v4 → v6}/commands/init/steps/announce.js +0 -0
- /package/bin/{v4 → v6}/commands/init/steps/createProject.js +0 -0
- /package/bin/{v4 → v6}/commands/init/steps/locateDestination.js +0 -0
- /package/bin/{v4 → v6}/commands/init/steps/locateSource.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/buildHeader.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/start.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/start.js +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/headers.json +0 -0
- /package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/start.js +0 -0
- /package/bin/{v5/commands/init/template/v4 → v6/commands/init/template/v5}/index.html +0 -0
- /package/bin/{v5/commands/init/template/v4 → v6/commands/init/template/v5}/tailwindcss-3.4.17.css +0 -0
- /package/bin/{v5/commands/addListeners → v6/commands/initHtml}/steps/announce.js +0 -0
- /package/bin/{v5 → v6}/commands/initHtml/steps/checks.js +0 -0
- /package/bin/{v5 → v6}/commands/initHtml/steps/createProject.js +0 -0
- /package/bin/{v5/commands/addListeners → v6/commands/initHtml}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/addListeners → v6/commands/initHtml}/steps/locateSource.js +0 -0
- /package/bin/{v4/commands/init → v6/commands/initHtml}/steps/resolveFolderName.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v4 → v6/commands/initHtml/template/v5}/index.html +0 -0
- /package/bin/{v5/commands/initHtml/template/v4 → v6/commands/initHtml/template/v5}/tailwindcss-3.4.17.css +0 -0
- /package/bin/{v5 → v6}/commands/initHtml.js +0 -0
- /package/bin/{v5/commands/buildHeader → v6/commands/initJs}/steps/announce.js +0 -0
- /package/bin/{v4/commands/init → v6/commands/initJs}/steps/checks.js +0 -0
- /package/bin/{v5/commands/addListeners → v6/commands/initJs}/steps/createProject.js +0 -0
- /package/bin/{v5/commands/buildHeader → v6/commands/initJs}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/buildHeader → v6/commands/initJs}/steps/locateSource.js +0 -0
- /package/bin/{v5/commands/init → v6/commands/initJs}/steps/resolveFolderName.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/DomContentLoaded/buildHeader.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/DomContentLoaded/start.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/start.js +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/headers.json +0 -0
- /package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/start.js +0 -0
- /package/bin/{v5 → v6}/commands/initJs.js +0 -0
- /package/bin/{v5 → v6}/core/getAllVersions.js +0 -0
- /package/bin/{v4 → v6}/core/parseInput.js +0 -0
- /package/bin/{v4 → v6}/core/resolveCommand.js +0 -0
- /package/bin/{v5 → v6}/core/showUsage.js +0 -0
- /package/bin/{v5 → v6}/start.js +0 -0
- /package/bin/{v5/commands/htmlIdClick → v7/commands/addListeners}/steps/announce.js +0 -0
- /package/bin/{v5 → v7}/commands/addListeners/steps/checks.js +0 -0
- /package/bin/{v5/commands/buildHeader → v7/commands/addListeners}/steps/createProject.js +0 -0
- /package/bin/{v5/commands/htmlIdClick → v7/commands/addListeners}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/htmlIdClick → v7/commands/addListeners}/steps/locateSource.js +0 -0
- /package/bin/{v5 → v7}/commands/addListeners/steps/resolveFolderName.js +0 -0
- /package/bin/{v5 → v7}/commands/addListeners/template/v2/hookAllListeners.js +0 -0
- /package/bin/{v5 → v7}/commands/addListeners.js +0 -0
- /package/bin/{v5/commands/init → v7/commands/buildHeader}/steps/announce.js +0 -0
- /package/bin/{v5/commands/htmlIdClick → v7/commands/buildHeader}/steps/createProject.js +0 -0
- /package/bin/{v5/commands/init → v7/commands/buildHeader}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/init → v7/commands/buildHeader}/steps/locateSource.js +0 -0
- /package/bin/{v5 → v7}/commands/buildHeader/steps/resolveFolderName.js +0 -0
- /package/bin/{v5 → v7}/commands/buildHeader/template/v1/buildHeader.js +0 -0
- /package/bin/{v5 → v7}/commands/buildHeader.js +0 -0
- /package/bin/{v5/commands/initHtml → v7/commands/htmlIdClick}/steps/announce.js +0 -0
- /package/bin/{v5 → v7}/commands/htmlIdClick/steps/checks.js +0 -0
- /package/bin/{v5/commands/init → v7/commands/htmlIdClick}/steps/createProject.js +0 -0
- /package/bin/{v5/commands/initHtml → v7/commands/htmlIdClick}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/initHtml → v7/commands/htmlIdClick}/steps/locateSource.js +0 -0
- /package/bin/{v5 → v7}/commands/htmlIdClick/steps/resolveFolderName.js +0 -0
- /package/bin/{v5 → v7}/commands/htmlIdClick/template/v1/clickFunc.js +0 -0
- /package/bin/{v5 → v7}/commands/htmlIdClick/template/v1/start.js +0 -0
- /package/bin/{v5 → v7}/commands/htmlIdClick.js +0 -0
- /package/bin/{v5/commands/initJs → v7/commands/init}/steps/announce.js +0 -0
- /package/bin/{v5/commands/initJs → v7/commands/init}/steps/createProject.js +0 -0
- /package/bin/{v5/commands/initJs → v7/commands/init}/steps/locateDestination.js +0 -0
- /package/bin/{v5/commands/initJs → v7/commands/init}/steps/locateSource.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/buildHeader.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/FormLoad/DomContentLoaded/start.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/FormLoad/start.js +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/headers.json +0 -0
- /package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/start.js +0 -0
- /package/bin/{v5 → v7}/commands/initHtml/steps/resolveFolderName.js +0 -0
- /package/bin/{v5/commands/init → v7/commands/initJs}/steps/checks.js +0 -0
- /package/bin/{v5 → v7}/commands/initJs/steps/resolveFolderName.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/DomContentLoaded/buildHeader.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/DomContentLoaded/start.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/start.js +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/headers.json +0 -0
- /package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/start.js +0 -0
- /package/bin/{v5 → v7}/core/parseInput.js +0 -0
- /package/bin/{v5 → v7}/core/resolveCommand.js +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { locateSource } from "./initHtml/steps/locateSource.js";
|
|
2
|
+
|
|
3
|
+
import { createProject } from "./initHtml/steps/createProject.js";
|
|
4
|
+
import { announce } from "./initHtml/steps/announce.js";
|
|
5
|
+
|
|
6
|
+
import resolveFolderName from "./initHtml/steps/resolveFolderName.js";
|
|
7
|
+
import checks from "./initHtml/steps/checks.js";
|
|
8
|
+
|
|
9
|
+
export default ({ folderName = "", toPath = process.cwd(), inAnnounce = true }) => {
|
|
10
|
+
const fromChecks = checks({ toPath, inAnnounce });
|
|
11
|
+
|
|
12
|
+
if (fromChecks) return false;
|
|
13
|
+
|
|
14
|
+
const resolvedFolderName = resolveFolderName({
|
|
15
|
+
name: folderName
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const source = locateSource();
|
|
19
|
+
const destination = resolvedFolderName;
|
|
20
|
+
|
|
21
|
+
createProject({ source, destination });
|
|
22
|
+
|
|
23
|
+
if (inAnnounce) announce({ inResolvedFolderName: resolvedFolderName });
|
|
24
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
const templatePath = path.join(
|
|
10
|
+
__dirname,
|
|
11
|
+
"..",
|
|
12
|
+
"template"
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const versions = fs
|
|
16
|
+
.readdirSync(templatePath)
|
|
17
|
+
.filter(item => item.startsWith("v"));
|
|
18
|
+
|
|
19
|
+
const highestVersion =
|
|
20
|
+
versions.sort().at(-1);
|
|
21
|
+
|
|
22
|
+
const sourceVersion =
|
|
23
|
+
highestVersion;
|
|
24
|
+
|
|
25
|
+
export const locateSource = () => {
|
|
26
|
+
return path.join(
|
|
27
|
+
__dirname,
|
|
28
|
+
"..",
|
|
29
|
+
"template",
|
|
30
|
+
sourceVersion
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { locateSource } from "./
|
|
2
|
-
import { locateDestination } from "./
|
|
1
|
+
import { locateSource } from "./initJs/steps/locateSource.js";
|
|
2
|
+
import { locateDestination } from "./initJs/steps/locateDestination.js";
|
|
3
3
|
|
|
4
|
-
import { createProject } from "./
|
|
5
|
-
import { announce } from "./
|
|
4
|
+
import { createProject } from "./initJs/steps/createProject.js";
|
|
5
|
+
import { announce } from "./initJs/steps/announce.js";
|
|
6
6
|
|
|
7
|
-
import resolveFolderName from "./
|
|
8
|
-
import checks from "./
|
|
7
|
+
import resolveFolderName from "./initJs/steps/resolveFolderName.js";
|
|
8
|
+
import checks from "./initJs/steps/checks.js";
|
|
9
9
|
|
|
10
10
|
export default ({ folderName = "", toPath = process.cwd(), inAnnounce = true }) => {
|
|
11
11
|
const fromChecks = checks({ toPath, inAnnounce });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
const files = fs.readdirSync(new URL("../commands/", import.meta.url));
|
|
4
|
+
|
|
5
|
+
const entries = await Promise.all(
|
|
6
|
+
files.filter(f => f.endsWith(".js"))
|
|
7
|
+
.map(async f => [f.replace(".js", ""), (await import(`../commands/${f}`)).default])
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
const map = Object.fromEntries(entries);
|
|
11
|
+
|
|
12
|
+
export default map;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import allVersions from "./getAllVersions.js";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
KSchema CLI – Dynamic Usage Renderer
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export default function showUsage(version) {
|
|
8
|
+
const g = "\x1b[32m";
|
|
9
|
+
const y = "\x1b[33m";
|
|
10
|
+
const c = "\x1b[36m";
|
|
11
|
+
const gray = "\x1b[90m";
|
|
12
|
+
const r = "\x1b[0m";
|
|
13
|
+
|
|
14
|
+
const commandLines = Object.entries(allVersions)
|
|
15
|
+
.map(([name]) =>
|
|
16
|
+
` ${g}${name.padEnd(20)}${r}`
|
|
17
|
+
)
|
|
18
|
+
.join("\n");
|
|
19
|
+
|
|
20
|
+
const exampleLines = Object.entries(allVersions)
|
|
21
|
+
.map(([name]) =>
|
|
22
|
+
` ${gray}npx @keshavsoft/express-todo ${name}${r}`
|
|
23
|
+
)
|
|
24
|
+
.join("\n");
|
|
25
|
+
|
|
26
|
+
console.log(`
|
|
27
|
+
${c}🚀 express-todo v${version}${r}
|
|
28
|
+
|
|
29
|
+
${y}Usage:${r}
|
|
30
|
+
${g}npx @keshavsoft/express-todo${r} <command> [options]
|
|
31
|
+
|
|
32
|
+
${y}Commands:${r}
|
|
33
|
+
${commandLines}
|
|
34
|
+
|
|
35
|
+
${y}Examples:${r}
|
|
36
|
+
${exampleLines}
|
|
37
|
+
|
|
38
|
+
${y}Tip:${r}
|
|
39
|
+
${gray}npm i -g @keshavsoft/express-todo${r}
|
|
40
|
+
`);
|
|
41
|
+
}
|
package/bin/{v4 → v7}/start.js
RENAMED
|
@@ -10,6 +10,8 @@ const version = pkg.version;
|
|
|
10
10
|
const run = async () => {
|
|
11
11
|
const input = parseInput();
|
|
12
12
|
|
|
13
|
+
if (!input.cmd) return showUsage(version);
|
|
14
|
+
|
|
13
15
|
if (input.action === "--help" || input.action === "-h" || input.action === "help") return showUsage(version);
|
|
14
16
|
|
|
15
17
|
const command = resolveCommand(input.cmd);
|
package/package.json
CHANGED
package/bin/v4/commands/init.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { locateSource } from "./init/steps/locateSource.js";
|
|
2
|
-
import { locateDestination } from "./init/steps/locateDestination.js";
|
|
3
|
-
|
|
4
|
-
import { createProject } from "./init/steps/createProject.js";
|
|
5
|
-
import { announce } from "./init/steps/announce.js";
|
|
6
|
-
|
|
7
|
-
import resolveFolderName from "./init/steps/resolveFolderName.js";
|
|
8
|
-
import checks from "./init/steps/checks.js";
|
|
9
|
-
|
|
10
|
-
export default ({ folderName = "", toPath = process.cwd(), inAnnounce = true }) => {
|
|
11
|
-
const fromChecks = checks({ toPath, inAnnounce });
|
|
12
|
-
|
|
13
|
-
if (fromChecks) return false;
|
|
14
|
-
|
|
15
|
-
const resolvedFolderName = resolveFolderName({
|
|
16
|
-
name: folderName
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const source = locateSource();
|
|
20
|
-
const destination = locateDestination({ inResolvedFolderName: resolvedFolderName });
|
|
21
|
-
|
|
22
|
-
createProject({ source, destination });
|
|
23
|
-
|
|
24
|
-
if (inAnnounce) announce({ inResolvedFolderName: resolvedFolderName });
|
|
25
|
-
};
|
package/bin/v4/core/showUsage.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
JSON CRUD UI CLI – Entry Flow
|
|
3
|
-
|
|
4
|
-
1. Read user input from terminal (parseInput)
|
|
5
|
-
2. If no command → show usage
|
|
6
|
-
3. If help flags → show usage
|
|
7
|
-
4. Resolve command dynamically
|
|
8
|
-
5. If command not found → show usage
|
|
9
|
-
6. Validate command requirements
|
|
10
|
-
7. Execute command
|
|
11
|
-
|
|
12
|
-
Goal:
|
|
13
|
-
- Zero confusion for user
|
|
14
|
-
- Single source of truth (showUsage)
|
|
15
|
-
- Self-validating commands
|
|
16
|
-
- Easy to extend (drop-in command architecture)
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
export default function showUsage(version) {
|
|
20
|
-
const g = "\x1b[32m";
|
|
21
|
-
const y = "\x1b[33m";
|
|
22
|
-
const c = "\x1b[36m";
|
|
23
|
-
const gray = "\x1b[90m";
|
|
24
|
-
const r = "\x1b[0m";
|
|
25
|
-
|
|
26
|
-
console.log(`
|
|
27
|
-
${c}🚀 json-crud-ui-components v${version}${r}
|
|
28
|
-
|
|
29
|
-
${y}Usage:${r}
|
|
30
|
-
${g}npx json-crud-ui-components${r} <command>
|
|
31
|
-
|
|
32
|
-
${y}Commands:${r}
|
|
33
|
-
${g}init${r} Creates initial boilerplate structure
|
|
34
|
-
${g}addListeners${r} Adds listeners boilerplate
|
|
35
|
-
${g}buildHeader${r} Builds header structure
|
|
36
|
-
${g}htmlIdClick${r} Adds htmlIdClick handler
|
|
37
|
-
|
|
38
|
-
${y}Examples:${r}
|
|
39
|
-
${gray}npx json-crud-ui-components init${r}
|
|
40
|
-
${gray}npx json-crud-ui-components addListeners${r}
|
|
41
|
-
|
|
42
|
-
${y}Architecture:${r}
|
|
43
|
-
${gray}commands are auto-loaded dynamically${r}
|
|
44
|
-
${gray}each command validates required files${r}
|
|
45
|
-
|
|
46
|
-
${y}Tip:${r}
|
|
47
|
-
${gray}Run init first before feature commands${r}
|
|
48
|
-
`);
|
|
49
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
|
|
4
|
-
const validate = ({ toPath }) => {
|
|
5
|
-
const htmlPath = path.join(toPath, "index.html");
|
|
6
|
-
const indexPath = path.join(toPath, "index");
|
|
7
|
-
|
|
8
|
-
if (!fs.existsSync(htmlPath)) {
|
|
9
|
-
console.log("index.html not found");
|
|
10
|
-
|
|
11
|
-
return true;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
if (fs.existsSync(indexPath)) {
|
|
15
|
-
console.log("index folder found");
|
|
16
|
-
|
|
17
|
-
return true;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return false;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default validate;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/FormLoad/start.js
RENAMED
|
File without changes
|
/package/bin/{v4/commands/init/template/v3 → v6/commands/init/template/v5/Index}/headers.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/init/template/v4 → v6/commands/init/template/v5}/tailwindcss-3.4.17.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/initHtml/template/v4 → v6/commands/initHtml/template/v5}/index.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/init/template/v3 → v6/commands/initJs/template/v4}/FormLoad/start.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5 → v6}/start.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/htmlIdClick → v7/commands/addListeners}/steps/locateDestination.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/headers.json
RENAMED
|
File without changes
|
/package/bin/{v5/commands/initHtml/template/v3 → v7/commands/init/template/v5/Index}/start.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/{v5/commands/initJs/template/v3 → v7/commands/initJs/template/v4}/FormLoad/start.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|