generator-bitloops 0.3.5 → 0.3.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/setup/index.js +6 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-bitloops",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
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
@@ -97,8 +97,9 @@ export default class extends Generator {
97
97
  this.installStorybook = function() {
98
98
  // Conditionally initialize Storybook
99
99
  if (this.options.storybook) {
100
- this.log("Adding Storybook...");
101
- this.spawnCommandSync('npx', ['-y', 'storybook@8.4', 'init', '--no-dev']);
100
+ this.log('Installing Storybook...');
101
+ this.spawnCommandSync('npx', ['-y', 'storybook@^8.4', 'init', '--no-dev']);
102
+ this.log('Storybook installed!');
102
103
  // if (this.options.tailwind && this.options.storybook) {
103
104
  // Tailwind CSS specific setup for older versions of Storybook
104
105
  // this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']);
@@ -109,15 +110,16 @@ export default class extends Generator {
109
110
  this.installCypress = function() {
110
111
  // Conditionally add Cypress
111
112
  if (this.options.cypress) {
112
- this.log("Adding Cypress...");
113
+ this.log('Installing Cypress...');
113
114
  this.spawnCommandSync('npm', ['install', '--save-dev', 'cypress']);
115
+ this.log('Cypress installed!');
114
116
  }
115
117
  }
116
118
 
117
119
  this.patchFiles = async function() {
118
120
  // Conditionally initialize Storybook
119
121
  if (this.options.storybook) {
120
- this.log("Making Storybook changes...");
122
+ this.log('Making Storybook changes...');
121
123
  if (this.options.tailwind) {
122
124
  fs.unlinkSync(this.destinationPath('.storybook/preview.ts'));
123
125
  this.log('Setting up Tailwind CSS with Storybook...');
@@ -211,11 +213,8 @@ export default class extends Generator {
211
213
 
212
214
  async main() {
213
215
  await this.installNextJS();
214
- this.log('Installing Storybook');
215
216
  this.installStorybook();
216
- this.log('Installing Cypress');
217
217
  this.installCypress();
218
- this.log('Patching files');
219
218
  await this.patchFiles();
220
219
  if (this.options.git) {
221
220
  await this.commitChanges();