generator-bitloops 0.3.3 → 0.3.4

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 +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-bitloops",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
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
@@ -200,7 +200,11 @@ export default class extends Generator {
200
200
 
201
201
  this.commitChanges = async function() {
202
202
  this.log('Committing changes to git...');
203
- await new Promise((resolve, error) => {exec('git add . && git commit -m "Initial setup"').on('exit', (code) => {
203
+ await new Promise((resolve) => {exec(`cd ${toKebabCase(this.options.project)} && git add . && git commit -m "Initial setup"`).on('exit', (code) => {
204
+ if (code !== 0) {
205
+ this.log('Error committing changes to git! ', code);
206
+ resolve();
207
+ }
204
208
  this.log('Git changes committed!');
205
209
  resolve();
206
210
  });});