generator-bitloops 0.3.26 → 0.3.27
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 +20 -0
package/package.json
CHANGED
package/setup/index.js
CHANGED
|
@@ -118,6 +118,12 @@ export default class extends Generator {
|
|
|
118
118
|
default: false,
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
+
this.option('baseUi', {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
description: 'Add Base UI React components (@base-ui/react)',
|
|
124
|
+
default: false,
|
|
125
|
+
});
|
|
126
|
+
|
|
121
127
|
this.installNextJS = async function () {
|
|
122
128
|
// Clone Next.js template with Tailwind if specified, using the project name
|
|
123
129
|
const createNextAppCommand = ['-y', 'create-next-app@latest'];
|
|
@@ -253,6 +259,19 @@ export default class extends Generator {
|
|
|
253
259
|
}
|
|
254
260
|
};
|
|
255
261
|
|
|
262
|
+
this.installBaseUi = function () {
|
|
263
|
+
// Conditionally add Base UI
|
|
264
|
+
if (this.options.baseUi) {
|
|
265
|
+
this.log('Installing Base UI...');
|
|
266
|
+
spawnSync(
|
|
267
|
+
'pnpm',
|
|
268
|
+
['add', '@base-ui/react@^1.1.0'],
|
|
269
|
+
{ stdio: 'inherit', cwd: this.destinationRoot() },
|
|
270
|
+
);
|
|
271
|
+
this.log('Base UI installed!');
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
256
275
|
this.installPrimitives = function () {
|
|
257
276
|
// Conditionally add Primitives
|
|
258
277
|
if (this.options.primitives) {
|
|
@@ -429,6 +448,7 @@ export default class extends Generator {
|
|
|
429
448
|
await this.installNextJS();
|
|
430
449
|
this.installCypress();
|
|
431
450
|
this.installI18n();
|
|
451
|
+
this.installBaseUi();
|
|
432
452
|
this.installPrimitives();
|
|
433
453
|
this.installStorybook();
|
|
434
454
|
await this.patchFiles();
|