Skip to content

Commit 803a742

Browse files
committed
Commit setup changes to git v0.3.3
1 parent cb03716 commit 803a742

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-bitloops",
3-
"version": "0.3.1",
3+
"version": "0.3.3",
44
"description": "Next.js with TypeScript, Tailwind, Storybook and Cypress generator by Bitloops",
55
"license": "MIT",
66
"author": "Bitloops S.A.",

setup/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class extends Generator {
9797
// Conditionally initialize Storybook
9898
if (this.options.storybook) {
9999
this.log("Adding Storybook...");
100-
this.spawnCommandSync('npx', ['-y', 'storybook@7.4', 'init', '--no-dev']);
100+
this.spawnCommandSync('npx', ['-y', 'storybook@8.4', 'init', '--no-dev']);
101101
// if (this.options.tailwind) {
102102
// Tailwind CSS specific setup if needed
103103
// this.spawnCommandSync('npx', ['storybook@latest', 'add', '@storybook/addon-styling-webpack']);
@@ -197,6 +197,14 @@ export default class extends Generator {
197197
);
198198
}
199199
}
200+
201+
this.commitChanges = async function() {
202+
this.log('Committing changes to git...');
203+
await new Promise((resolve, error) => {exec('git add . && git commit -m "Initial setup"').on('exit', (code) => {
204+
this.log('Git changes committed!');
205+
resolve();
206+
});});
207+
}
200208
}
201209

202210
initializing() {
@@ -222,6 +230,7 @@ export default class extends Generator {
222230
this.installCypress();
223231
this.log('Patching files');
224232
await this.patchFiles();
233+
await this.commitChanges();
225234
}
226235

227236
end() {

0 commit comments

Comments
 (0)