gustcss 0.1.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/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # GustCSS
2
+
3
+ Lightning-fast CSS utility generator. Scan your code, generate utilities on-demand.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install gustcss
9
+ # or
10
+ pnpm add gustcss
11
+ # or
12
+ yarn add gustcss
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### CLI
18
+
19
+ ```bash
20
+ # Generate CSS
21
+ gustcss build
22
+
23
+ # Watch mode
24
+ gustcss watch
25
+
26
+ # Initialize config
27
+ gustcss init
28
+ ```
29
+
30
+ ### With Build Tools
31
+
32
+ #### PostCSS
33
+
34
+ ```bash
35
+ npm install @gustcss/postcss
36
+ ```
37
+
38
+ ```js
39
+ // postcss.config.js
40
+ module.exports = {
41
+ plugins: [
42
+ require('@gustcss/postcss')(),
43
+ ],
44
+ };
45
+ ```
46
+
47
+ #### Vite
48
+
49
+ ```bash
50
+ npm install @gustcss/vite
51
+ ```
52
+
53
+ ```js
54
+ // vite.config.js
55
+ import gustcss from '@gustcss/vite';
56
+
57
+ export default {
58
+ plugins: [gustcss()],
59
+ };
60
+ ```
61
+
62
+ ## Configuration
63
+
64
+ Create `gustcss.config.json`:
65
+
66
+ ```json
67
+ {
68
+ "content": ["./src/**/*.{js,ts,jsx,tsx}"],
69
+ "output": "dist/utility.css",
70
+ "darkMode": "class",
71
+ "theme": {
72
+ "extend": {
73
+ "colors": {}
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## License
80
+
81
+ MIT
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+ const path = require('path');
5
+ const { platform, arch } = process;
6
+
7
+ // プラットフォームとアーキテクチャのマッピング
8
+ const platformMap = {
9
+ darwin: {
10
+ arm64: 'gustcss-darwin-arm64',
11
+ x64: 'gustcss-darwin-x64',
12
+ },
13
+ linux: {
14
+ arm64: 'gustcss-linux-arm64',
15
+ x64: 'gustcss-linux-x64',
16
+ },
17
+ win32: {
18
+ x64: 'gustcss-win32-x64.exe',
19
+ },
20
+ };
21
+
22
+ function getBinaryPath() {
23
+ const platformBinaries = platformMap[platform];
24
+ if (!platformBinaries) {
25
+ console.error(`Unsupported platform: ${platform}`);
26
+ console.error('Supported platforms: darwin, linux, win32');
27
+ process.exit(1);
28
+ }
29
+
30
+ const binaryName = platformBinaries[arch];
31
+ if (!binaryName) {
32
+ console.error(`Unsupported architecture: ${arch} on ${platform}`);
33
+ process.exit(1);
34
+ }
35
+
36
+ return path.join(__dirname, 'bin', binaryName);
37
+ }
38
+
39
+ const binaryPath = getBinaryPath();
40
+ const args = process.argv.slice(2);
41
+
42
+ const child = spawn(binaryPath, args, {
43
+ stdio: 'inherit',
44
+ shell: process.platform === 'win32'
45
+ });
46
+
47
+ child.on('exit', (code) => {
48
+ process.exit(code);
49
+ });
50
+
51
+ child.on('error', (error) => {
52
+ console.error('Failed to start gustcss:', error.message);
53
+ console.error('Binary path:', binaryPath);
54
+ process.exit(1);
55
+ });
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "gustcss",
3
+ "version": "0.1.0",
4
+ "description": "Lightning-fast CSS utility generator - Scan your code, generate utilities on-demand",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "gustcss": "index.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "index.js",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "keywords": [
16
+ "css",
17
+ "utility",
18
+ "postcss",
19
+ "vite",
20
+ "cli",
21
+ "gustcss",
22
+ "gust"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "engines": {
28
+ "node": ">=18.0.0"
29
+ },
30
+ "license": "MIT"
31
+ }