new-s-block 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/bin/cli.js +7 -3
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -123,14 +123,18 @@ async function main() {
123
123
  // 3. Description
124
124
  const blockDescription = await prompt(rl, 'Block description (optional): ');
125
125
 
126
- // 4. Extra keywords
126
+ // 4. Block category
127
+ const categoryRaw = await prompt(rl, 'Block category [s-tier]: ');
128
+ const blockCategory = categoryRaw.trim() || 's-tier';
129
+
130
+ // 5. Extra keywords
127
131
  const extraKeywordsRaw = await prompt(rl, 'Additional keywords (comma-separated, optional): ');
128
132
  const extraKeywords = extraKeywordsRaw
129
133
  .split(',')
130
134
  .map(function (k) { return k.trim().toLowerCase(); })
131
135
  .filter(Boolean);
132
136
 
133
- // 5. Blocks folder
137
+ // 6. Blocks folder
134
138
  const folderRaw = await prompt(rl, 'Blocks folder [blocks]: ');
135
139
 
136
140
  rl.close();
@@ -175,7 +179,7 @@ async function main() {
175
179
  ' "name": "acf/' + blockName + '",\n' +
176
180
  ' "title": "' + blockLabel + '",\n' +
177
181
  ' "description": "' + (blockDescription.trim() || blockLabel) + ' Block",\n' +
178
- ' "category": "s-tier",\n' +
182
+ ' "category": "' + blockCategory + '",\n' +
179
183
  ' "viewScript": "file:./' + blockName + '.js",\n' +
180
184
  ' "icon": ' + JSON.stringify(svgIcon) + ',\n' +
181
185
  ' "keywords": ' + keywordsJson + ',\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "new-s-block",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "CLI tool to scaffold ACF Gutenberg blocks",
5
5
  "bin": {
6
6
  "new-s-block": "./bin/cli.js"