@ifi/oh-pi-skills 0.4.4 → 0.5.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.
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: liquid-glass
3
- description:
4
- Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass
3
+ description: Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass
5
4
  morphism following Apple's design language. Provides CSS tokens, component patterns, dark/light
6
5
  mode, and animation specs.
7
6
  ---
@@ -45,18 +44,18 @@ All tokens are defined in `references/tokens.css`. Key categories:
45
44
 
46
45
  ```css
47
46
  .glass-card {
48
- background: var(--lg-bg-primary);
49
- backdrop-filter: blur(var(--lg-blur-md));
50
- -webkit-backdrop-filter: blur(var(--lg-blur-md));
51
- border: 1px solid var(--lg-border-color);
52
- border-radius: var(--lg-radius-lg);
53
- box-shadow: var(--lg-shadow-elevated);
54
- transition: transform var(--lg-duration-normal) var(--lg-easing-spring);
47
+ background: var(--lg-bg-primary);
48
+ backdrop-filter: blur(var(--lg-blur-md));
49
+ -webkit-backdrop-filter: blur(var(--lg-blur-md));
50
+ border: 1px solid var(--lg-border-color);
51
+ border-radius: var(--lg-radius-lg);
52
+ box-shadow: var(--lg-shadow-elevated);
53
+ transition: transform var(--lg-duration-normal) var(--lg-easing-spring);
55
54
  }
56
55
 
57
56
  .glass-card:hover {
58
- transform: translateY(-2px);
59
- box-shadow: var(--lg-shadow-high);
57
+ transform: translateY(-2px);
58
+ box-shadow: var(--lg-shadow-high);
60
59
  }
61
60
  ```
62
61
 
@@ -64,10 +63,10 @@ All tokens are defined in `references/tokens.css`. Key categories:
64
63
 
65
64
  ```css
66
65
  .glass-toolbar {
67
- background: var(--lg-bg-toolbar);
68
- backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
69
- -webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
70
- border-bottom: 1px solid var(--lg-border-subtle);
66
+ background: var(--lg-bg-toolbar);
67
+ backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
68
+ -webkit-backdrop-filter: blur(var(--lg-blur-lg)) saturate(var(--lg-saturate));
69
+ border-bottom: 1px solid var(--lg-border-subtle);
71
70
  }
72
71
  ```
73
72
 
@@ -75,16 +74,16 @@ All tokens are defined in `references/tokens.css`. Key categories:
75
74
 
76
75
  ```css
77
76
  .glass-btn {
78
- background: var(--lg-bg-interactive);
79
- backdrop-filter: blur(var(--lg-blur-sm));
80
- border: 1px solid var(--lg-border-color);
81
- border-radius: var(--lg-radius-md);
82
- transition: all var(--lg-duration-fast) var(--lg-easing-spring);
77
+ background: var(--lg-bg-interactive);
78
+ backdrop-filter: blur(var(--lg-blur-sm));
79
+ border: 1px solid var(--lg-border-color);
80
+ border-radius: var(--lg-radius-md);
81
+ transition: all var(--lg-duration-fast) var(--lg-easing-spring);
83
82
  }
84
83
 
85
84
  .glass-btn:active {
86
- transform: scale(0.97);
87
- background: var(--lg-bg-pressed);
85
+ transform: scale(0.97);
86
+ background: var(--lg-bg-pressed);
88
87
  }
89
88
  ```
90
89
 
@@ -92,15 +91,15 @@ All tokens are defined in `references/tokens.css`. Key categories:
92
91
 
93
92
  ```css
94
93
  .glass-overlay {
95
- background: var(--lg-bg-scrim);
96
- backdrop-filter: blur(var(--lg-blur-xl));
94
+ background: var(--lg-bg-scrim);
95
+ backdrop-filter: blur(var(--lg-blur-xl));
97
96
  }
98
97
 
99
98
  .glass-modal {
100
- background: var(--lg-bg-elevated);
101
- border: 1px solid var(--lg-border-color);
102
- border-radius: var(--lg-radius-xl);
103
- box-shadow: var(--lg-shadow-high);
99
+ background: var(--lg-bg-elevated);
100
+ border: 1px solid var(--lg-border-color);
101
+ border-radius: var(--lg-radius-xl);
102
+ box-shadow: var(--lg-shadow-high);
104
103
  }
105
104
  ```
106
105
 
@@ -112,10 +111,10 @@ dark-tinted glass with higher blur to maintain readability.
112
111
  ```css
113
112
  /* Force a mode on a subtree */
114
113
  .light-glass {
115
- color-scheme: light;
114
+ color-scheme: light;
116
115
  }
117
116
  .dark-glass {
118
- color-scheme: dark;
117
+ color-scheme: dark;
119
118
  }
120
119
  ```
121
120
 
@@ -126,18 +125,18 @@ Use spring-based easing for physical feel:
126
125
  ```css
127
126
  /* Entry */
128
127
  @keyframes glass-enter {
129
- from {
130
- opacity: 0;
131
- transform: scale(0.95) translateY(8px);
132
- }
133
- to {
134
- opacity: 1;
135
- transform: scale(1) translateY(0);
136
- }
128
+ from {
129
+ opacity: 0;
130
+ transform: scale(0.95) translateY(8px);
131
+ }
132
+ to {
133
+ opacity: 1;
134
+ transform: scale(1) translateY(0);
135
+ }
137
136
  }
138
137
 
139
138
  .glass-animate-in {
140
- animation: glass-enter var(--lg-duration-normal) var(--lg-easing-spring) both;
139
+ animation: glass-enter var(--lg-duration-normal) var(--lg-easing-spring) both;
141
140
  }
142
141
  ```
143
142
 
@@ -1,81 +1,81 @@
1
1
  /* Liquid Glass Design Tokens */
2
2
 
3
3
  :root {
4
- color-scheme: light dark;
4
+ color-scheme: light dark;
5
5
 
6
- /* Blur */
7
- --lg-blur-sm: 8px;
8
- --lg-blur-md: 16px;
9
- --lg-blur-lg: 32px;
10
- --lg-blur-xl: 48px;
6
+ /* Blur */
7
+ --lg-blur-sm: 8px;
8
+ --lg-blur-md: 16px;
9
+ --lg-blur-lg: 32px;
10
+ --lg-blur-xl: 48px;
11
11
 
12
- /* Saturation */
13
- --lg-saturate: 1.8;
12
+ /* Saturation */
13
+ --lg-saturate: 1.8;
14
14
 
15
- /* Radius */
16
- --lg-radius-sm: 8px;
17
- --lg-radius-md: 12px;
18
- --lg-radius-lg: 16px;
19
- --lg-radius-xl: 24px;
15
+ /* Radius */
16
+ --lg-radius-sm: 8px;
17
+ --lg-radius-md: 12px;
18
+ --lg-radius-lg: 16px;
19
+ --lg-radius-xl: 24px;
20
20
 
21
- /* Shadows */
22
- --lg-shadow-subtle: 0 1px 3px rgba(0,0,0,0.08);
23
- --lg-shadow-elevated: 0 4px 16px rgba(0,0,0,0.1);
24
- --lg-shadow-high: 0 8px 32px rgba(0,0,0,0.15);
21
+ /* Shadows */
22
+ --lg-shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.08);
23
+ --lg-shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.1);
24
+ --lg-shadow-high: 0 8px 32px rgba(0, 0, 0, 0.15);
25
25
 
26
- /* Animation */
27
- --lg-duration-fast: 150ms;
28
- --lg-duration-normal: 300ms;
29
- --lg-duration-slow: 500ms;
30
- --lg-easing-spring: cubic-bezier(0.22, 1, 0.36, 1);
26
+ /* Animation */
27
+ --lg-duration-fast: 150ms;
28
+ --lg-duration-normal: 300ms;
29
+ --lg-duration-slow: 500ms;
30
+ --lg-easing-spring: cubic-bezier(0.22, 1, 0.36, 1);
31
31
 
32
- /* Light mode (default) */
33
- --lg-bg-primary: rgba(255,255,255,0.72);
34
- --lg-bg-elevated: rgba(255,255,255,0.82);
35
- --lg-bg-toolbar: rgba(255,255,255,0.65);
36
- --lg-bg-interactive: rgba(255,255,255,0.5);
37
- --lg-bg-pressed: rgba(255,255,255,0.35);
38
- --lg-bg-scrim: rgba(0,0,0,0.25);
39
- --lg-border-color: rgba(255,255,255,0.45);
40
- --lg-border-subtle: rgba(0,0,0,0.06);
32
+ /* Light mode (default) */
33
+ --lg-bg-primary: rgba(255, 255, 255, 0.72);
34
+ --lg-bg-elevated: rgba(255, 255, 255, 0.82);
35
+ --lg-bg-toolbar: rgba(255, 255, 255, 0.65);
36
+ --lg-bg-interactive: rgba(255, 255, 255, 0.5);
37
+ --lg-bg-pressed: rgba(255, 255, 255, 0.35);
38
+ --lg-bg-scrim: rgba(0, 0, 0, 0.25);
39
+ --lg-border-color: rgba(255, 255, 255, 0.45);
40
+ --lg-border-subtle: rgba(0, 0, 0, 0.06);
41
41
  }
42
42
 
43
43
  @media (prefers-color-scheme: dark) {
44
- :root {
45
- --lg-bg-primary: rgba(30,30,30,0.65);
46
- --lg-bg-elevated: rgba(40,40,40,0.75);
47
- --lg-bg-toolbar: rgba(25,25,25,0.6);
48
- --lg-bg-interactive: rgba(255,255,255,0.1);
49
- --lg-bg-pressed: rgba(255,255,255,0.06);
50
- --lg-bg-scrim: rgba(0,0,0,0.5);
51
- --lg-border-color: rgba(255,255,255,0.12);
52
- --lg-border-subtle: rgba(255,255,255,0.06);
53
- --lg-shadow-subtle: 0 1px 3px rgba(0,0,0,0.3);
54
- --lg-shadow-elevated: 0 4px 16px rgba(0,0,0,0.4);
55
- --lg-shadow-high: 0 8px 32px rgba(0,0,0,0.5);
56
- }
44
+ :root {
45
+ --lg-bg-primary: rgba(30, 30, 30, 0.65);
46
+ --lg-bg-elevated: rgba(40, 40, 40, 0.75);
47
+ --lg-bg-toolbar: rgba(25, 25, 25, 0.6);
48
+ --lg-bg-interactive: rgba(255, 255, 255, 0.1);
49
+ --lg-bg-pressed: rgba(255, 255, 255, 0.06);
50
+ --lg-bg-scrim: rgba(0, 0, 0, 0.5);
51
+ --lg-border-color: rgba(255, 255, 255, 0.12);
52
+ --lg-border-subtle: rgba(255, 255, 255, 0.06);
53
+ --lg-shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3);
54
+ --lg-shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.4);
55
+ --lg-shadow-high: 0 8px 32px rgba(0, 0, 0, 0.5);
56
+ }
57
57
  }
58
58
 
59
59
  @media (prefers-contrast: high) {
60
- :root {
61
- --lg-bg-primary: rgba(255,255,255,0.95);
62
- --lg-bg-elevated: rgba(255,255,255,0.98);
63
- --lg-border-color: rgba(0,0,0,0.3);
64
- }
60
+ :root {
61
+ --lg-bg-primary: rgba(255, 255, 255, 0.95);
62
+ --lg-bg-elevated: rgba(255, 255, 255, 0.98);
63
+ --lg-border-color: rgba(0, 0, 0, 0.3);
64
+ }
65
65
  }
66
66
 
67
67
  @media (prefers-contrast: high) and (prefers-color-scheme: dark) {
68
- :root {
69
- --lg-bg-primary: rgba(20,20,20,0.95);
70
- --lg-bg-elevated: rgba(25,25,25,0.98);
71
- --lg-border-color: rgba(255,255,255,0.3);
72
- }
68
+ :root {
69
+ --lg-bg-primary: rgba(20, 20, 20, 0.95);
70
+ --lg-bg-elevated: rgba(25, 25, 25, 0.98);
71
+ --lg-border-color: rgba(255, 255, 255, 0.3);
72
+ }
73
73
  }
74
74
 
75
75
  @media (prefers-reduced-motion: reduce) {
76
- :root {
77
- --lg-duration-fast: 0ms;
78
- --lg-duration-normal: 0ms;
79
- --lg-duration-slow: 0ms;
80
- }
76
+ :root {
77
+ --lg-duration-fast: 0ms;
78
+ --lg-duration-normal: 0ms;
79
+ --lg-duration-slow: 0ms;
80
+ }
81
81
  }
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: neubrutalism
3
- description:
4
- Neubrutalism design system skill. Use when building bold UI with thick borders, offset solid
3
+ description: Neubrutalism design system skill. Use when building bold UI with thick borders, offset solid
5
4
  shadows, high saturation colors, and minimal border radius.
6
5
  version: 1.0.0
7
6
  tags: [design, css, ui, neubrutalism, brutalism]
@@ -25,10 +24,10 @@ Reference: [references/tokens.css](references/tokens.css)
25
24
  @import "references/tokens.css";
26
25
 
27
26
  .nb-card {
28
- background: var(--nb-yellow);
29
- border: var(--nb-border-thick);
30
- border-radius: var(--nb-radius);
31
- box-shadow: var(--nb-shadow);
27
+ background: var(--nb-yellow);
28
+ border: var(--nb-border-thick);
29
+ border-radius: var(--nb-radius);
30
+ box-shadow: var(--nb-shadow);
32
31
  }
33
32
  ```
34
33
 
@@ -38,11 +37,11 @@ Reference: [references/tokens.css](references/tokens.css)
38
37
 
39
38
  ```css
40
39
  .nb-card {
41
- background: var(--nb-white);
42
- border: var(--nb-border-thick);
43
- border-radius: var(--nb-radius);
44
- box-shadow: var(--nb-shadow);
45
- padding: 1.5rem;
40
+ background: var(--nb-white);
41
+ border: var(--nb-border-thick);
42
+ border-radius: var(--nb-radius);
43
+ box-shadow: var(--nb-shadow);
44
+ padding: 1.5rem;
46
45
  }
47
46
  ```
48
47
 
@@ -50,25 +49,25 @@ Reference: [references/tokens.css](references/tokens.css)
50
49
 
51
50
  ```css
52
51
  .nb-btn {
53
- background: var(--nb-yellow);
54
- border: var(--nb-border);
55
- border-radius: var(--nb-radius);
56
- box-shadow: var(--nb-shadow-sm);
57
- padding: 0.6rem 1.4rem;
58
- font-family: var(--nb-font);
59
- font-weight: var(--nb-font-weight);
60
- cursor: pointer;
61
- transition:
62
- transform 0.1s,
63
- box-shadow 0.1s;
52
+ background: var(--nb-yellow);
53
+ border: var(--nb-border);
54
+ border-radius: var(--nb-radius);
55
+ box-shadow: var(--nb-shadow-sm);
56
+ padding: 0.6rem 1.4rem;
57
+ font-family: var(--nb-font);
58
+ font-weight: var(--nb-font-weight);
59
+ cursor: pointer;
60
+ transition:
61
+ transform 0.1s,
62
+ box-shadow 0.1s;
64
63
  }
65
64
  .nb-btn:hover {
66
- transform: translate(-2px, -2px);
67
- box-shadow: var(--nb-shadow);
65
+ transform: translate(-2px, -2px);
66
+ box-shadow: var(--nb-shadow);
68
67
  }
69
68
  .nb-btn:active {
70
- transform: translate(3px, 3px);
71
- box-shadow: none;
69
+ transform: translate(3px, 3px);
70
+ box-shadow: none;
72
71
  }
73
72
  ```
74
73
 
@@ -76,12 +75,12 @@ Reference: [references/tokens.css](references/tokens.css)
76
75
 
77
76
  ```css
78
77
  .nb-nav {
79
- background: var(--nb-bg);
80
- border-bottom: var(--nb-border-thick);
81
- padding: 1rem 2rem;
82
- position: sticky;
83
- top: 0;
84
- z-index: 100;
78
+ background: var(--nb-bg);
79
+ border-bottom: var(--nb-border-thick);
80
+ padding: 1rem 2rem;
81
+ position: sticky;
82
+ top: 0;
83
+ z-index: 100;
85
84
  }
86
85
  ```
87
86
 
@@ -89,17 +88,17 @@ Reference: [references/tokens.css](references/tokens.css)
89
88
 
90
89
  ```css
91
90
  .nb-input {
92
- background: var(--nb-white);
93
- border: var(--nb-border);
94
- border-radius: var(--nb-radius);
95
- box-shadow: var(--nb-shadow-sm);
96
- padding: 0.6rem 1rem;
97
- font-family: var(--nb-font);
98
- font-weight: var(--nb-font-weight-body);
91
+ background: var(--nb-white);
92
+ border: var(--nb-border);
93
+ border-radius: var(--nb-radius);
94
+ box-shadow: var(--nb-shadow-sm);
95
+ padding: 0.6rem 1rem;
96
+ font-family: var(--nb-font);
97
+ font-weight: var(--nb-font-weight-body);
99
98
  }
100
99
  .nb-input:focus {
101
- outline: none;
102
- box-shadow: var(--nb-shadow);
100
+ outline: none;
101
+ box-shadow: var(--nb-shadow);
103
102
  }
104
103
  ```
105
104
 
@@ -107,13 +106,13 @@ Reference: [references/tokens.css](references/tokens.css)
107
106
 
108
107
  ```css
109
108
  .nb-badge {
110
- background: var(--nb-pink);
111
- border: var(--nb-border);
112
- border-radius: var(--nb-radius);
113
- padding: 0.2rem 0.8rem;
114
- font-family: var(--nb-font);
115
- font-weight: var(--nb-font-weight);
116
- font-size: 0.85rem;
109
+ background: var(--nb-pink);
110
+ border: var(--nb-border);
111
+ border-radius: var(--nb-radius);
112
+ padding: 0.2rem 0.8rem;
113
+ font-family: var(--nb-font);
114
+ font-weight: var(--nb-font-weight);
115
+ font-size: 0.85rem;
117
116
  }
118
117
  ```
119
118
 
@@ -128,13 +127,13 @@ Reference: [references/tokens.css](references/tokens.css)
128
127
  h1,
129
128
  h2,
130
129
  h3 {
131
- font-family: var(--nb-font-heading);
132
- font-weight: var(--nb-font-weight);
133
- letter-spacing: var(--nb-letter-spacing);
130
+ font-family: var(--nb-font-heading);
131
+ font-weight: var(--nb-font-weight);
132
+ letter-spacing: var(--nb-letter-spacing);
134
133
  }
135
134
  body {
136
- font-family: var(--nb-font);
137
- font-weight: var(--nb-font-weight-body);
135
+ font-family: var(--nb-font);
136
+ font-weight: var(--nb-font-weight-body);
138
137
  }
139
138
  ```
140
139
 
@@ -146,9 +145,9 @@ body {
146
145
 
147
146
  ```css
148
147
  @media (prefers-reduced-motion: reduce) {
149
- .nb-btn:hover,
150
- .nb-btn:active {
151
- transform: none;
152
- }
148
+ .nb-btn:hover,
149
+ .nb-btn:active {
150
+ transform: none;
151
+ }
153
152
  }
154
153
  ```
@@ -1,44 +1,44 @@
1
1
  :root {
2
- /* Borders */
3
- --nb-border: 3px solid #000;
4
- --nb-border-thick: 5px solid #000;
2
+ /* Borders */
3
+ --nb-border: 3px solid #000;
4
+ --nb-border-thick: 5px solid #000;
5
5
 
6
- /* Shadows (offset solid, no blur) */
7
- --nb-shadow-sm: 3px 3px 0 #000;
8
- --nb-shadow: 5px 5px 0 #000;
9
- --nb-shadow-lg: 8px 8px 0 #000;
6
+ /* Shadows (offset solid, no blur) */
7
+ --nb-shadow-sm: 3px 3px 0 #000;
8
+ --nb-shadow: 5px 5px 0 #000;
9
+ --nb-shadow-lg: 8px 8px 0 #000;
10
10
 
11
- /* Radius */
12
- --nb-radius: 4px;
13
- --nb-radius-lg: 8px;
11
+ /* Radius */
12
+ --nb-radius: 4px;
13
+ --nb-radius-lg: 8px;
14
14
 
15
- /* Colors — high saturation */
16
- --nb-pink: #ff6b9d;
17
- --nb-yellow: #ffd43b;
18
- --nb-blue: #4dabf7;
19
- --nb-green: #51cf66;
20
- --nb-orange: #ff922b;
21
- --nb-purple: #cc5de8;
22
- --nb-red: #ff6b6b;
23
- --nb-white: #fff;
24
- --nb-black: #000;
25
- --nb-bg: #f5f0e8;
15
+ /* Colors — high saturation */
16
+ --nb-pink: #ff6b9d;
17
+ --nb-yellow: #ffd43b;
18
+ --nb-blue: #4dabf7;
19
+ --nb-green: #51cf66;
20
+ --nb-orange: #ff922b;
21
+ --nb-purple: #cc5de8;
22
+ --nb-red: #ff6b6b;
23
+ --nb-white: #fff;
24
+ --nb-black: #000;
25
+ --nb-bg: #f5f0e8;
26
26
 
27
- /* Typography */
28
- --nb-font: 'Space Grotesk', 'Inter', system-ui, sans-serif;
29
- --nb-font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
30
- --nb-font-weight: 700;
31
- --nb-font-weight-body: 500;
32
- --nb-letter-spacing: -0.02em;
27
+ /* Typography */
28
+ --nb-font: "Space Grotesk", "Inter", system-ui, sans-serif;
29
+ --nb-font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
30
+ --nb-font-weight: 700;
31
+ --nb-font-weight-body: 500;
32
+ --nb-letter-spacing: -0.02em;
33
33
  }
34
34
 
35
35
  [data-theme="dark"] {
36
- --nb-border: 3px solid #fff;
37
- --nb-border-thick: 5px solid #fff;
38
- --nb-shadow-sm: 3px 3px 0 #fff;
39
- --nb-shadow: 5px 5px 0 #fff;
40
- --nb-shadow-lg: 8px 8px 0 #fff;
41
- --nb-bg: #1a1a2e;
42
- --nb-black: #fff;
43
- --nb-white: #1a1a2e;
36
+ --nb-border: 3px solid #fff;
37
+ --nb-border-thick: 5px solid #fff;
38
+ --nb-shadow-sm: 3px 3px 0 #fff;
39
+ --nb-shadow: 5px 5px 0 #fff;
40
+ --nb-shadow-lg: 8px 8px 0 #fff;
41
+ --nb-bg: #1a1a2e;
42
+ --nb-black: #fff;
43
+ --nb-white: #1a1a2e;
44
44
  }
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: quick-setup
3
- description:
4
- Detect project type and generate .pi/ configuration. Use when setting up pi for a new project or
3
+ description: Detect project type and generate .pi/ configuration. Use when setting up pi for a new project or
5
4
  when user asks to initialize pi config.
6
5
  ---
7
6
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: rust-workspace-bootstrap
3
- description:
4
- Scaffold a production-ready Rust workspace with knope changesets, devenv, and GitHub Actions CI/release workflows. Use when starting a new Rust project or monorepo.
3
+ description: Scaffold a production-ready Rust workspace with knope changesets, devenv, and GitHub Actions CI/release workflows. Use when starting a new Rust project or monorepo.
5
4
  ---
6
5
 
7
6
  # Rust Workspace Bootstrap
@@ -83,4 +82,4 @@ Dry-run a release:
83
82
 
84
83
  ```bash
85
84
  knope release --dry-run
86
- ```
85
+ ```
@@ -25,13 +25,13 @@ Options:
25
25
 
26
26
  function parseArgs(argv) {
27
27
  const options = {
28
- name: "",
29
- dir: "",
30
- owner: "your-github-org",
31
- repo: "",
32
28
  description: "",
29
+ dir: "",
33
30
  force: false,
34
31
  help: false,
32
+ name: "",
33
+ owner: "your-github-org",
34
+ repo: "",
35
35
  };
36
36
 
37
37
  for (let index = 0; index < argv.length; index += 1) {
@@ -54,23 +54,29 @@ function parseArgs(argv) {
54
54
  index += 1;
55
55
 
56
56
  switch (key) {
57
- case "name":
57
+ case "name": {
58
58
  options.name = value;
59
59
  break;
60
- case "dir":
60
+ }
61
+ case "dir": {
61
62
  options.dir = value;
62
63
  break;
63
- case "owner":
64
+ }
65
+ case "owner": {
64
66
  options.owner = value;
65
67
  break;
66
- case "repo":
68
+ }
69
+ case "repo": {
67
70
  options.repo = value;
68
71
  break;
69
- case "description":
72
+ }
73
+ case "description": {
70
74
  options.description = value;
71
75
  break;
72
- default:
76
+ }
77
+ default: {
73
78
  throw new Error(`Unknown option: ${arg}`);
79
+ }
74
80
  }
75
81
  continue;
76
82
  }
@@ -148,26 +154,26 @@ function main() {
148
154
 
149
155
  const projectName = options.name;
150
156
  const projectTitle = toTitleCase(projectName);
151
- const cratePrefix = projectName.replace(/-/g, "_");
157
+ const cratePrefix = projectName.replaceAll(/-/g, "_");
152
158
  const coreCrate = `${cratePrefix}_core`;
153
159
  const cliCrate = `${cratePrefix}_cli`;
154
160
  const targetDir = path.resolve(options.dir || projectName);
155
- const owner = options.owner;
161
+ const {owner} = options;
156
162
  const repo = options.repo || projectName;
157
163
  const description = options.description || `${projectTitle} Rust workspace`;
158
164
 
159
165
  const tokens = {
160
- "__PROJECT_NAME__": projectName,
161
- "__PROJECT_TITLE__": projectTitle,
162
- "__CORE_CRATE__": coreCrate,
163
- "__CLI_CRATE__": cliCrate,
164
- "__GITHUB_OWNER__": owner,
165
- "__GITHUB_REPO__": repo,
166
- "__DESCRIPTION__": description,
166
+ __CLI_CRATE__: cliCrate,
167
+ __CORE_CRATE__: coreCrate,
168
+ __DESCRIPTION__: description,
169
+ __GITHUB_OWNER__: owner,
170
+ __GITHUB_REPO__: repo,
171
+ __PROJECT_NAME__: projectName,
172
+ __PROJECT_TITLE__: projectTitle,
167
173
  };
168
174
 
169
- const currentFile = fileURLToPath(import.meta.url);
170
- const baseDir = path.dirname(currentFile);
175
+ const currentFile = import.meta.filename;
176
+ const baseDir = import.meta.dirname;
171
177
  const templateDir = path.join(baseDir, "template");
172
178
 
173
179
  if (!fs.existsSync(templateDir)) {
@@ -1,3 +1,3 @@
1
- # __PROJECT_TITLE__
1
+ # **PROJECT_TITLE**
2
2
 
3
- Welcome to the __PROJECT_NAME__ documentation.
3
+ Welcome to the **PROJECT_NAME** documentation.
@@ -26,12 +26,7 @@
26
26
  "markdown": {
27
27
  "textWrap": "never"
28
28
  },
29
- "excludes": [
30
- ".devenv/**",
31
- "**/target",
32
- ".bin/",
33
- "**/node_modules"
34
- ],
29
+ "excludes": [".devenv/**", "**/target", ".bin/", "**/node_modules"],
35
30
  "plugins": [
36
31
  "https://plugins.dprint.dev/markdown-0.20.0.wasm",
37
32
  "https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364",