Skip to content

Commit 3d31a6d

Browse files
author
suraj.patel
committed
Removing the git auto commit option for user feasibility.
1 parent d222fb8 commit 3d31a6d

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,14 @@ Type: `Object`<br>
126126
Default: `{}`
127127

128128
This option gives you per loader module count, module time to execute, time comparison
129-
with previous build of each loader. It takes two input, one is the `filePath` which is
130-
filename where all build details will be written and second one is `commitBuildInfo` which
131-
is not mandatory but on basis of this flag, your `filePath file` gets git commited to your
132-
`current checkout branch` and will also push it to remote origin.
133-
`Note :- i) Node version > 0.10 ii) filePath option is mandatory, commitBuildInfo is not mandatory. iii) But if you apply commitBuildInfo you should checkout the branch on your machine/server on which the filePath file should get committed before running your webpack build. Also the module count will only be visible when the outputFormat is 'humanVerbose'.`,
129+
with previous build of each loader. It takes input as `filePath` which is
130+
filename where all build details will be written.
131+
`Note :- i) Node version > 0.10 ii) filePath option is mandatory. iii) The module count will only be visible when the outputFormat is 'humanVerbose'.`,
134132
e.g.
135133

136134
```javascript
137135
const smp = new SpeedMeasurePlugin({
138-
compareLoadersBuild: { filePath: "./buildInfo.json", commitBuildInfo: true },
136+
compareLoadersBuild: { filePath: "./buildInfo.json" },
139137
});
140138
```
141139

index.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = class SpeedMeasurePlugin {
3333
this.apply = this.apply.bind(this);
3434
this.provideLoaderTiming = this.provideLoaderTiming.bind(this);
3535
this.getLoadersBuildComparison = this.getLoadersBuildComparison.bind(this);
36-
this.commitBuidlComparison = this.commitBuidlComparison.bind(this);
3736
}
3837

3938
wrap(config) {
@@ -72,19 +71,6 @@ module.exports = class SpeedMeasurePlugin {
7271
return config;
7372
}
7473

75-
commitBuidlComparison() {
76-
let loaderFile = this.options.compareLoadersBuild.filePath || "";
77-
let gitCmd = `git add ${loaderFile} && git commit -m 'Updating file with new build info' && git push origin`;
78-
exec(gitCmd, function(err, stdout, stderr) {
79-
if (err) {
80-
console.log(fg("There was error while committing your changes."), err);
81-
return;
82-
}
83-
console.log("--------------------------------------------");
84-
console.log(fg("Succefully Committed Build Info."), stdout);
85-
console.log("--------------------------------------------");
86-
});
87-
}
8874
getLoadersBuildComparison() {
8975
let objBuildData = { loaderInfo: [] };
9076
let loaderFile = this.options.compareLoadersBuild.filePath || "";
@@ -164,12 +150,9 @@ module.exports = class SpeedMeasurePlugin {
164150
}
165151
console.table(outputTable);
166152
}
167-
168-
// Commiting the build info file to git remote repo.
169-
this.options.compareLoadersBuild.commitBuildInfo &&
170-
this.commitBuidlComparison();
171153
}
172154
}
155+
173156
getOutput() {
174157
const outputObj = {};
175158
if (this.timeEventData.misc)

0 commit comments

Comments
 (0)