@configjs/cli 1.0.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/LICENSE +22 -0
- package/README.md +431 -0
- package/dist/check-JF56SNQC.js +126 -0
- package/dist/chunk-5T664O5A.js +8402 -0
- package/dist/chunk-PQLKGF6I.js +224 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +41 -0
- package/dist/install-X7G2IXXX.js +1127 -0
- package/dist/list-J4E7JFII.js +75 -0
- package/package.json +95 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pluginRegistry
|
|
3
|
+
} from "./chunk-5T664O5A.js";
|
|
4
|
+
|
|
5
|
+
// src/cli/commands/list.ts
|
|
6
|
+
function listLibraries(options) {
|
|
7
|
+
console.log("\n\u{1F4E6} Biblioth\xE8ques disponibles\n");
|
|
8
|
+
const filteredPlugins = options.category ? pluginRegistry.filter((p) => p.category === options.category) : pluginRegistry;
|
|
9
|
+
if (filteredPlugins.length === 0) {
|
|
10
|
+
console.log(
|
|
11
|
+
`\u26A0\uFE0F Aucune biblioth\xE8que trouv\xE9e pour la cat\xE9gorie: ${options.category}`
|
|
12
|
+
);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const byCategory = filteredPlugins.reduce(
|
|
16
|
+
(acc, plugin) => {
|
|
17
|
+
if (!acc[plugin.category]) {
|
|
18
|
+
acc[plugin.category] = [];
|
|
19
|
+
}
|
|
20
|
+
const categoryArray = acc[plugin.category];
|
|
21
|
+
if (categoryArray) {
|
|
22
|
+
categoryArray.push(plugin);
|
|
23
|
+
}
|
|
24
|
+
return acc;
|
|
25
|
+
},
|
|
26
|
+
{}
|
|
27
|
+
);
|
|
28
|
+
const categoryLabels = {
|
|
29
|
+
["routing" /* ROUTING */]: "\u{1F4CD} Routing",
|
|
30
|
+
["state" /* STATE */]: "\u{1F5C4}\uFE0F State Management",
|
|
31
|
+
["http" /* HTTP */]: "\u{1F310} HTTP Client",
|
|
32
|
+
["css" /* CSS */]: "\u{1F3A8} CSS Framework",
|
|
33
|
+
["ui" /* UI */]: "\u{1F3A8} UI Components",
|
|
34
|
+
["forms" /* FORMS */]: "\u{1F4DD} Forms",
|
|
35
|
+
["tooling" /* TOOLING */]: "\u{1F6E0}\uFE0F Tooling",
|
|
36
|
+
["testing" /* TESTING */]: "\u{1F9EA} Testing",
|
|
37
|
+
["i18n" /* I18N */]: "\u{1F30D} Internationalization",
|
|
38
|
+
["animation" /* ANIMATION */]: "\u2728 Animation",
|
|
39
|
+
["utils" /* UTILS */]: "\u{1F527} Utilities"
|
|
40
|
+
};
|
|
41
|
+
for (const [category, plugins] of Object.entries(byCategory)) {
|
|
42
|
+
const label = categoryLabels[category] || category;
|
|
43
|
+
console.log(`${label}`);
|
|
44
|
+
console.log("\u2500".repeat(50));
|
|
45
|
+
for (const plugin of plugins) {
|
|
46
|
+
const version = plugin.version ? ` (${plugin.version})` : "";
|
|
47
|
+
console.log(` \u2022 ${plugin.displayName}${version}`);
|
|
48
|
+
console.log(` ${plugin.description}`);
|
|
49
|
+
console.log(` Package: ${plugin.name}`);
|
|
50
|
+
if (plugin.frameworks && plugin.frameworks.length > 0) {
|
|
51
|
+
console.log(` Frameworks: ${plugin.frameworks.join(", ")}`);
|
|
52
|
+
}
|
|
53
|
+
if (plugin.incompatibleWith && plugin.incompatibleWith.length > 0) {
|
|
54
|
+
console.log(
|
|
55
|
+
` \u26A0\uFE0F Incompatible avec: ${plugin.incompatibleWith.join(", ")}`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
console.log("");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
console.log(`
|
|
62
|
+
\u{1F4CA} Total: ${filteredPlugins.length} biblioth\xE8que(s)`);
|
|
63
|
+
if (!options.category) {
|
|
64
|
+
console.log(
|
|
65
|
+
"\n\u{1F4A1} Astuce: Utilisez --category <nom> pour filtrer par cat\xE9gorie"
|
|
66
|
+
);
|
|
67
|
+
console.log(" Cat\xE9gories disponibles:");
|
|
68
|
+
console.log(
|
|
69
|
+
Object.keys(categoryLabels).map((cat) => ` - ${cat}`).join("\n")
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
listLibraries
|
|
75
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@configjs/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Configure your frontend stack, instantly - Utilitaire CLI d'installation modulaire de bibliothèques frontend",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"cli",
|
|
8
|
+
"react",
|
|
9
|
+
"installer",
|
|
10
|
+
"configuration",
|
|
11
|
+
"setup",
|
|
12
|
+
"boilerplate",
|
|
13
|
+
"automation",
|
|
14
|
+
"frontend",
|
|
15
|
+
"typescript",
|
|
16
|
+
"vite"
|
|
17
|
+
],
|
|
18
|
+
"author": "Julien",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/julien-lin/configjs.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/julien-lin/configjs/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/julien-lin/configjs#readme",
|
|
28
|
+
"bin": {
|
|
29
|
+
"confjs": "./dist/cli.js",
|
|
30
|
+
"configjs": "./dist/cli.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20.0.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"dev": "tsup src/cli.ts --format esm --watch --sourcemap",
|
|
42
|
+
"build": "tsup src/cli.ts --format esm --dts --clean",
|
|
43
|
+
"build:watch": "tsup src/cli.ts --format esm --dts --watch",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"lint": "eslint . --max-warnings 0",
|
|
46
|
+
"lint:fix": "eslint . --fix",
|
|
47
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,json,md}\"",
|
|
48
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,json,md}\"",
|
|
49
|
+
"test": "vitest",
|
|
50
|
+
"test:unit": "vitest run --coverage",
|
|
51
|
+
"test:watch": "vitest watch",
|
|
52
|
+
"test:integration": "vitest run tests/integration",
|
|
53
|
+
"test:e2e": "vitest run tests/e2e",
|
|
54
|
+
"prepublishOnly": "npm run typecheck && npm run lint && npm run test:unit && npm run build",
|
|
55
|
+
"prepare": "husky install"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"chalk": "^5.6.2",
|
|
59
|
+
"commander": "^14.0.2",
|
|
60
|
+
"conf": "^15.0.2",
|
|
61
|
+
"execa": "^9.6.1",
|
|
62
|
+
"fs-extra": "^11.3.3",
|
|
63
|
+
"inquirer": "^13.1.0",
|
|
64
|
+
"ora": "^9.0.0",
|
|
65
|
+
"picocolors": "^1.1.1",
|
|
66
|
+
"type-fest": "^5.3.1",
|
|
67
|
+
"zod": "^4.3.2"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@eslint/js": "^9.39.2",
|
|
71
|
+
"@types/fs-extra": "^11.0.4",
|
|
72
|
+
"@types/inquirer": "^9.0.9",
|
|
73
|
+
"@types/node": "^25.0.3",
|
|
74
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
75
|
+
"eslint": "^9.39.2",
|
|
76
|
+
"eslint-config-prettier": "^10.1.8",
|
|
77
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
78
|
+
"husky": "^9.1.7",
|
|
79
|
+
"lint-staged": "^16.2.7",
|
|
80
|
+
"prettier": "^3.7.4",
|
|
81
|
+
"tsup": "^8.5.1",
|
|
82
|
+
"typescript": "^5.9.3",
|
|
83
|
+
"typescript-eslint": "^8.51.0",
|
|
84
|
+
"vitest": "^4.0.16"
|
|
85
|
+
},
|
|
86
|
+
"lint-staged": {
|
|
87
|
+
"*.ts": [
|
|
88
|
+
"eslint --fix",
|
|
89
|
+
"prettier --write"
|
|
90
|
+
],
|
|
91
|
+
"*.{json,md}": [
|
|
92
|
+
"prettier --write"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|