eva-css-fluid 1.0.4 → 2.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/cli.cjs ADDED
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * EVA CSS CLI
5
+ * Commands for configuration validation and management
6
+ */
7
+
8
+ const { validateConfigCommand, generateScssCommand } = require('./src/config-loader.cjs');
9
+
10
+ const args = process.argv.slice(2);
11
+ const command = args[0];
12
+
13
+ function printHelp() {
14
+ console.log(`
15
+ EVA CSS - Fluid Design Framework
16
+
17
+ Usage:
18
+ eva-css <command> [options]
19
+
20
+ Commands:
21
+ validate Validate eva.config.js or package.json configuration
22
+ generate Generate SCSS variables from config file
23
+ help Show this help message
24
+
25
+ Examples:
26
+ eva-css validate
27
+ eva-css generate src/_config-generated.scss
28
+
29
+ Configuration:
30
+ Create eva.config.js in your project root or add "eva" key to package.json
31
+ See: https://eva-css.xyz/configuration
32
+ `);
33
+ }
34
+
35
+ switch (command) {
36
+ case 'validate':
37
+ validateConfigCommand();
38
+ break;
39
+
40
+ case 'generate':
41
+ const outputPath = args[1] || 'src/_config-generated.scss';
42
+ generateScssCommand(outputPath);
43
+ break;
44
+
45
+ case 'help':
46
+ case '--help':
47
+ case '-h':
48
+ case undefined:
49
+ printHelp();
50
+ process.exit(0);
51
+ break;
52
+
53
+ default:
54
+ console.error(`❌ Unknown command: ${command}\n`);
55
+ printHelp();
56
+ process.exit(1);
57
+ }