generator-bitloops 0.3.33 → 0.3.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-bitloops",
3
- "version": "0.3.33",
3
+ "version": "0.3.34",
4
4
  "description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops",
5
5
  "license": "MIT",
6
6
  "author": "Bitloops S.A.",
package/setup/index.js CHANGED
@@ -17,8 +17,8 @@ const PLATFORM_NEXT_FOLDER = 'platform-next';
17
17
  const PLATFORM_NEXT_SRC_FOLDER = `${PLATFORM_NEXT_FOLDER}/src`;
18
18
  const PLATFORM_VITE_FOLDER = 'platform-vite';
19
19
  const PLATFORM_VITE_SRC_FOLDER = `${PLATFORM_VITE_FOLDER}/src`;
20
- const LIB_TYPES_FOLDER = 'lib/types';
21
- const LIB_ROUTER_FOLDER = 'lib/router';
20
+ const LIB_TYPES_FOLDER = 'src/lib/types';
21
+ const LIB_ROUTER_FOLDER = 'src/lib/router';
22
22
 
23
23
  function isKebabCase(str) {
24
24
  // Check if the string is empty
@@ -291,17 +291,21 @@ export default class extends Generator {
291
291
 
292
292
  this.log(`Latest stable 10.x version: ${latest10}`);
293
293
  // Initializing storybook with nextjs+vite
294
- runSync('npx', [
295
- '-y',
296
- `storybook@${latest10}`,
297
- 'init',
298
- '--no-dev',
299
- '--yes',
300
- '--type',
301
- 'nextjs',
302
- '--builder',
303
- 'vite',
304
- ], { cwd: this.destinationRoot() });
294
+ runSync(
295
+ 'npx',
296
+ [
297
+ '-y',
298
+ `storybook@${latest10}`,
299
+ 'init',
300
+ '--no-dev',
301
+ '--yes',
302
+ '--type',
303
+ 'nextjs',
304
+ '--builder',
305
+ 'vite',
306
+ ],
307
+ { cwd: this.destinationRoot() },
308
+ );
305
309
  this.log('Storybook installed!');
306
310
  // Verifies the correct nextjs-vite framework is used
307
311
  runSync('pnpm', ['add', '-D', '@storybook/nextjs-vite@^10'], {
@@ -320,13 +324,17 @@ export default class extends Generator {
320
324
  });
321
325
  this.log('Cypress installed!');
322
326
  if (this.options.bitloops) {
323
- runSync('pnpm', [
324
- 'add',
325
- '-D',
326
- 'mochawesome',
327
- 'mochawesome-merge',
328
- 'mochawesome-report-generator',
329
- ], { cwd: this.destinationRoot() });
327
+ runSync(
328
+ 'pnpm',
329
+ [
330
+ 'add',
331
+ '-D',
332
+ 'mochawesome',
333
+ 'mochawesome-merge',
334
+ 'mochawesome-report-generator',
335
+ ],
336
+ { cwd: this.destinationRoot() },
337
+ );
330
338
  }
331
339
  }
332
340
  };
@@ -368,21 +376,25 @@ export default class extends Generator {
368
376
  // Conditionally add Vitest and related testing packages
369
377
  if (this.options.vitest) {
370
378
  this.log('Installing Vitest and testing packages...');
371
- runSync('pnpm', [
372
- 'add',
373
- '-D',
374
- 'vitest',
375
- '@vitest/ui',
376
- '@vitest/coverage-v8',
377
- '@vitest/browser-playwright',
378
- '@testing-library/react',
379
- '@testing-library/jest-dom',
380
- '@testing-library/user-event',
381
- '@vitejs/plugin-react',
382
- 'vite',
383
- 'jsdom',
384
- 'playwright',
385
- ], { cwd: this.destinationRoot() });
379
+ runSync(
380
+ 'pnpm',
381
+ [
382
+ 'add',
383
+ '-D',
384
+ 'vitest',
385
+ '@vitest/ui',
386
+ '@vitest/coverage-v8',
387
+ '@vitest/browser-playwright',
388
+ '@testing-library/react',
389
+ '@testing-library/jest-dom',
390
+ '@testing-library/user-event',
391
+ '@vitejs/plugin-react',
392
+ 'vite',
393
+ 'jsdom',
394
+ 'playwright',
395
+ ],
396
+ { cwd: this.destinationRoot() },
397
+ );
386
398
  this.log('Vitest and testing packages installed!');
387
399
  }
388
400
  };
@@ -753,7 +765,10 @@ export default class extends Generator {
753
765
  await this.withRetry(() => this.installNextJS(), 'Next.js install');
754
766
  await this.withRetry(() => this.installCypress(), 'Cypress');
755
767
  await this.withRetry(() => this.installI18n(), 'i18n');
756
- await this.withRetry(() => this.installIntlMessageFormat(), 'intl-messageformat');
768
+ await this.withRetry(
769
+ () => this.installIntlMessageFormat(),
770
+ 'intl-messageformat',
771
+ );
757
772
  await this.withRetry(() => this.installBaseUi(), 'Base UI');
758
773
  await this.withRetry(() => this.installRedux(), 'Redux');
759
774
  await this.withRetry(() => this.installVitest(), 'Vitest');
@@ -766,7 +781,10 @@ export default class extends Generator {
766
781
  await this.withRetry(() => this.installPrimitives(), 'Primitives');
767
782
  await this.withRetry(() => this.installStorybook(), 'Storybook');
768
783
  await this.withRetry(() => this.patchFiles(), 'Patch files');
769
- await this.withRetry(() => this.patchPackageJsonScripts(), 'Patch package.json');
784
+ await this.withRetry(
785
+ () => this.patchPackageJsonScripts(),
786
+ 'Patch package.json',
787
+ );
770
788
  if (this.options.git) {
771
789
  await this.withRetry(() => this.commitChanges(), 'Git commit');
772
790
  }