create-asaje-go-vue 0.3.6 → 0.3.7

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.
@@ -1265,22 +1265,26 @@ async function writeEnvFiles(destinationDir, answers) {
1265
1265
  }),
1266
1266
  );
1267
1267
 
1268
- await fs.writeFile(
1269
- path.join(destinationDir, "landing/.env"),
1270
- toEnvContent({
1271
- API_BASE_URL: `http://localhost:${answers.apiPort}`,
1272
- PWA_BASE_URL: "http://localhost:4174",
1273
- }),
1274
- );
1268
+ if (answers.includeLanding) {
1269
+ await fs.writeFile(
1270
+ path.join(destinationDir, "landing/.env"),
1271
+ toEnvContent({
1272
+ API_BASE_URL: `http://localhost:${answers.apiPort}`,
1273
+ PWA_BASE_URL: "http://localhost:4174",
1274
+ }),
1275
+ );
1276
+ }
1275
1277
 
1276
- await fs.writeFile(
1277
- path.join(destinationDir, "pwa/.env"),
1278
- toEnvContent({
1279
- VITE_APP_NAME: `${answers.appName} PWA`,
1280
- VITE_API_BASE_URL: `http://localhost:${answers.apiPort}/api/v1`,
1281
- VITE_REALTIME_BASE_URL: `http://localhost:${answers.realtimePort}`,
1282
- }),
1283
- );
1278
+ if (answers.includePwa) {
1279
+ await fs.writeFile(
1280
+ path.join(destinationDir, "pwa/.env"),
1281
+ toEnvContent({
1282
+ VITE_APP_NAME: `${answers.appName} PWA`,
1283
+ VITE_API_BASE_URL: `http://localhost:${answers.apiPort}/api/v1`,
1284
+ VITE_REALTIME_BASE_URL: `http://localhost:${answers.realtimePort}`,
1285
+ }),
1286
+ );
1287
+ }
1284
1288
  }
1285
1289
 
1286
1290
  async function writeGithubWorkflow(destinationDir, answers) {
@@ -5664,7 +5668,7 @@ async function ensureDestinationIsAvailable(destinationDir) {
5664
5668
 
5665
5669
  const files = await fs.readdir(destinationDir);
5666
5670
  if (files.length > 0) {
5667
- throw new Error(`Destination already exists and is not empty: ${destinationDir}`);
5671
+ throw new Error(`Destination already exists and is not empty: ${destinationDir}. Choose another directory or empty it before running create.`);
5668
5672
  }
5669
5673
  }
5670
5674
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-asaje-go-vue",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "CLI to scaffold, configure, and run the Asaje Go + Vue boilerplate",
5
5
  "type": "module",
6
6
  "bin": {