generator-bitloops 0.3.2 → 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.
- package/package.json +1 -1
- package/setup/index.js +13 -0
package/package.json
CHANGED
package/setup/index.js
CHANGED
|
@@ -197,6 +197,18 @@ export default class extends Generator {
|
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
this.commitChanges = async function() {
|
|
202
|
+
this.log('Committing changes to git...');
|
|
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
|
+
}
|
|
208
|
+
this.log('Git changes committed!');
|
|
209
|
+
resolve();
|
|
210
|
+
});});
|
|
211
|
+
}
|
|
200
212
|
}
|
|
201
213
|
|
|
202
214
|
initializing() {
|
|
@@ -222,6 +234,7 @@ export default class extends Generator {
|
|
|
222
234
|
this.installCypress();
|
|
223
235
|
this.log('Patching files');
|
|
224
236
|
await this.patchFiles();
|
|
237
|
+
await this.commitChanges();
|
|
225
238
|
}
|
|
226
239
|
|
|
227
240
|
end() {
|