Update gulpfile.js

Fixed gulpfile syntax for newer systems
This commit is contained in:
Hugo Bernier 2020-04-21 19:44:53 -04:00 committed by GitHub
parent 9d2a6813c9
commit 91318c4e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 20 deletions

View File

@ -36,17 +36,19 @@ let syncVersionsSubtask = build.subTask('version-sync', function (gulp, buildOpt
// log new version // log new version
this.log('New package-solution.json version:\t' + pkgSolution.solution.version); this.log('New package-solution.json version:\t' + pkgSolution.solution.version);
// write changed package-solution file fs.writeFile('./config/package-solution.json', JSON.stringify(pkgSolution, null, 4), function (err, result) {
fs.writeFile('./config/package-solution.json', JSON.stringify(pkgSolution, null, 4)); if (err) this.log('error', err);
});
} }
else { else {
this.log('package-solution.json version is up-to-date'); this.log('package-solution.json version is up-to-date');
} }
done(); done();
}); });
let syncVersionTask = build.task('version-sync', syncVersionsSubtask); let syncVersionTask = build.task('version-sync', syncVersionsSubtask);
build.rig.addPreBuildTask(syncVersionTask); build.rig.addPreBuildTask(syncVersionTask);