create-skateboard-app 1.0.7 → 1.0.9

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/CHANGELOG.md CHANGED
@@ -1,4 +1,13 @@
1
1
 
2
+ 1.0.9
3
+
4
+ Add black color
5
+
6
+ 1.0.8
7
+
8
+ Fix pages template
9
+ Read template constants
10
+
2
11
  1.0.7
3
12
 
4
13
  Add Stripe guide
package/bin/cli.js CHANGED
@@ -203,7 +203,8 @@ async function collectProjectConfig(projectName) {
203
203
  { label: '🟠 Orange', value: 'orange' },
204
204
  { label: '🟡 Yellow', value: 'yellow' },
205
205
  { label: '🩷 Pink', value: 'pink' },
206
- { label: '🩵 Cyan', value: 'cyan' }
206
+ { label: '🩵 Cyan', value: 'cyan' },
207
+ { label: '⚫ Black', value: 'black' }
207
208
  ];
208
209
 
209
210
  const selectedColor = await askChoice('Choose your app color:', colorChoices);
@@ -243,10 +244,24 @@ async function collectProjectConfig(projectName) {
243
244
  const backendURL = 'https://api.example.com';
244
245
  const devBackendURL = 'http://localhost:8000';
245
246
  const companyName = 'Your Company';
246
- const pages = [
247
+
248
+ // Read pages from the downloaded template's constants.json
249
+ let pages = [
247
250
  { title: 'Home', url: 'home', icon: 'house' },
248
251
  { title: 'Other', url: 'other', icon: 'inbox' }
249
252
  ];
253
+
254
+ try {
255
+ const templateConstantsPath = join(projectName, 'src', 'constants.json');
256
+ if (existsSync(templateConstantsPath)) {
257
+ const templateConstants = JSON.parse(readFileSync(templateConstantsPath, 'utf8'));
258
+ if (templateConstants.pages && Array.isArray(templateConstants.pages)) {
259
+ pages = templateConstants.pages;
260
+ }
261
+ }
262
+ } catch (err) {
263
+ // Use fallback pages if reading fails
264
+ }
250
265
 
251
266
  // Installation preferences
252
267
  const installDeps = true; // Always install dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skateboard-app",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Create a new Skateboard app with React, TailwindCSS, and more",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(git add:*)",
5
- "Bash(git commit:*)",
6
- "Bash(git push:*)",
7
- "Bash(git tag:*)"
8
- ],
9
- "deny": [],
10
- "ask": []
11
- }
12
- }