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 +1 -1
- package/setup/index.js +55 -37
- /package/setup/templates/{lib → src/lib}/router/index.ts +0 -0
- /package/setup/templates/{lib → src/lib}/router/types.ts +0 -0
- /package/setup/templates/{lib → src/lib}/router/useRouter.ts +0 -0
- /package/setup/templates/{lib → src/lib}/types/image.types.ts +0 -0
- /package/setup/templates/{lib → src/lib}/types/primitives.types.ts +0 -0
- /package/setup/templates/{lib → src/lib}/types/types.d.ts +0 -0
package/package.json
CHANGED
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(
|
|
295
|
-
'
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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(
|
|
324
|
-
'
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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(
|
|
372
|
-
'
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
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(
|
|
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(
|
|
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
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|