@webmate-studio/cli 0.1.1 → 0.2.1

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/wm.js CHANGED
@@ -7,7 +7,6 @@ import { devCommand } from '../src/commands/dev.js';
7
7
  import { initCommand } from '../src/commands/init.js';
8
8
  import { loginCommand } from '../src/commands/login.js';
9
9
  import { generate } from '../src/commands/generate.js';
10
- import { prop } from '../src/commands/prop.js';
11
10
  import { logout } from '../src/commands/logout.js';
12
11
  import { info } from '../src/commands/info.js';
13
12
  import { switchCommand } from '../src/commands/switch.js';
@@ -33,11 +32,11 @@ program
33
32
  .argument('[directory]', 'Directory to initialize', '.')
34
33
  .action(initCommand);
35
34
 
36
- // wm generate (g) - Generate new component or island
35
+ // wm generate (g) - Generate new component
37
36
  program
38
37
  .command('generate [type] [name]')
39
38
  .alias('g')
40
- .description('Generate a new component or island')
39
+ .description('Generate a new component (optionally with islands)')
41
40
  .option('--skip-wizard', 'Skip interactive wizard and create basic skeleton')
42
41
  .option('--islands', 'Create component with islands support')
43
42
  .option('--assets', 'Create component with assets directory')
@@ -45,12 +44,6 @@ program
45
44
  .option('--list-templates', 'List available island templates')
46
45
  .action(generate);
47
46
 
48
- // wm prop - Add property to component
49
- program
50
- .command('prop [filename]')
51
- .description('Add a property to a component (interactive)')
52
- .action(prop);
53
-
54
47
  // wm dev - Start development server
55
48
  program
56
49
  .command('dev')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmate-studio/cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio CLI - Build and manage your Webmate components",
6
6
  "keywords": [
@@ -19,6 +19,10 @@
19
19
  "bin": {
20
20
  "wm": "./bin/wm.js"
21
21
  },
22
+ "files": [
23
+ "bin",
24
+ "src"
25
+ ],
22
26
  "exports": {
23
27
  ".": "./src/index.js"
24
28
  },
@@ -189,12 +189,14 @@ async function createComponent(name, options) {
189
189
  message: 'Property type:',
190
190
  choices: [
191
191
  { name: 'String (text input)', value: 'string' },
192
+ { name: 'Textarea (multiline text)', value: 'textarea' },
193
+ { name: 'Rich Text (WYSIWYG editor)', value: 'richtext' },
192
194
  { name: 'Boolean (checkbox)', value: 'boolean' },
193
195
  { name: 'Number (number input)', value: 'number' },
194
196
  { name: 'Select (dropdown)', value: 'select' },
195
197
  { name: 'Color (color picker)', value: 'color' },
196
198
  { name: 'Image (image upload)', value: 'image' },
197
- { name: 'Rich Text (WYSIWYG editor)', value: 'richtext' }
199
+ { name: 'Icon (icon picker)', value: 'icon' }
198
200
  ]
199
201
  });
200
202
 
@@ -214,7 +216,7 @@ async function createComponent(name, options) {
214
216
  let propMax = null;
215
217
 
216
218
  // Type-specific configuration
217
- if (propType === 'string') {
219
+ if (propType === 'string' || propType === 'textarea') {
218
220
  propDefault = await input({
219
221
  message: 'Default value:',
220
222
  default: ''
@@ -273,6 +275,20 @@ async function createComponent(name, options) {
273
275
  });
274
276
  } else if (propType === 'richtext') {
275
277
  propDefault = '<p></p>';
278
+ } else if (propType === 'image') {
279
+ propDefault = {
280
+ uuid: null,
281
+ filename: '',
282
+ title: '',
283
+ alt: '',
284
+ caption: '',
285
+ copyright: ''
286
+ };
287
+ } else if (propType === 'icon') {
288
+ propDefault = await input({
289
+ message: 'Default icon (e.g., mdi:home):',
290
+ default: 'mdi:cube-outline'
291
+ });
276
292
  }
277
293
 
278
294
  // Build prop definition
@@ -72,12 +72,14 @@ export async function prop(filename) {
72
72
  message: 'Property type:',
73
73
  choices: [
74
74
  { name: 'String (text input)', value: 'string' },
75
+ { name: 'Textarea (multiline text)', value: 'textarea' },
76
+ { name: 'Rich Text (WYSIWYG editor)', value: 'richtext' },
75
77
  { name: 'Boolean (checkbox)', value: 'boolean' },
76
78
  { name: 'Number (number input)', value: 'number' },
77
79
  { name: 'Select (dropdown)', value: 'select' },
78
80
  { name: 'Color (color picker)', value: 'color' },
79
81
  { name: 'Image (image upload)', value: 'image' },
80
- { name: 'Rich Text (WYSIWYG editor)', value: 'richtext' }
82
+ { name: 'Icon (icon picker)', value: 'icon' }
81
83
  ]
82
84
  });
83
85
 
@@ -97,7 +99,7 @@ export async function prop(filename) {
97
99
  let propMax = null;
98
100
 
99
101
  // Type-specific configuration
100
- if (propType === 'string') {
102
+ if (propType === 'string' || propType === 'textarea') {
101
103
  propDefault = await input({
102
104
  message: 'Default value:',
103
105
  default: ''
@@ -157,7 +159,19 @@ export async function prop(filename) {
157
159
  } else if (propType === 'richtext') {
158
160
  propDefault = '<p></p>';
159
161
  } else if (propType === 'image') {
160
- propDefault = '';
162
+ propDefault = {
163
+ uuid: null,
164
+ filename: '',
165
+ title: '',
166
+ alt: '',
167
+ caption: '',
168
+ copyright: ''
169
+ };
170
+ } else if (propType === 'icon') {
171
+ propDefault = await input({
172
+ message: 'Default icon (e.g., mdi:home):',
173
+ default: 'mdi:cube-outline'
174
+ });
161
175
  }
162
176
 
163
177
  // Build new prop