Change getDirSize to default export

This commit is contained in:
Steven 2018-06-07 20:52:22 -04:00
parent 1e0c22453b
commit 06f411c4de
2 changed files with 4 additions and 5 deletions

View file

@ -12,7 +12,7 @@ const clone = require("gulp-clone");
const newer = require("gulp-newer");
const tsc = require("gulp-typescript");
const tsc_oop = require("./scripts/build/gulp-typescript-oop");
const { getDirSize } = require("./scripts/build/getDirSize");
const getDirSize = require("./scripts/build/getDirSize");
const insert = require("gulp-insert");
const sourcemaps = require("gulp-sourcemaps");
const Q = require("q");
@ -589,10 +589,9 @@ gulp.task("VerifyLKG", /*help*/ false, [], () => {
gulp.task("LKGInternal", /*help*/ false, ["lib", "local"]);
gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUseDebugMode"], () => {
const lib = "./lib";
const sizeBefore = getDirSize(lib);
const sizeBefore = getDirSize(lkgDirectory);
const seq = runSequence("LKGInternal", "VerifyLKG");
const sizeAfter = getDirSize(lib);
const sizeAfter = getDirSize(lkgDirectory);
if (sizeAfter > (sizeBefore * 1.10)) {
throw new Error("The lib folder increased by 10% or more. This likely indicates a bug.");
}

View file

@ -27,4 +27,4 @@ function getDirSize(root, seen = new Set()) {
.reduce((acc, num) => acc + num, 0);
}
exports.getDirSize = getDirSize;
module.exports = getDirSize;