Skip to content

Commit 06f411c

Browse files
committed
Change getDirSize to default export
1 parent 1e0c224 commit 06f411c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Gulpfile.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const clone = require("gulp-clone");
1212
const newer = require("gulp-newer");
1313
const tsc = require("gulp-typescript");
1414
const tsc_oop = require("./scripts/build/gulp-typescript-oop");
15-
const { getDirSize } = require("./scripts/build/getDirSize");
15+
const getDirSize = require("./scripts/build/getDirSize");
1616
const insert = require("gulp-insert");
1717
const sourcemaps = require("gulp-sourcemaps");
1818
const Q = require("q");
@@ -589,10 +589,9 @@ gulp.task("VerifyLKG", /*help*/ false, [], () => {
589589
gulp.task("LKGInternal", /*help*/ false, ["lib", "local"]);
590590

591591
gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUseDebugMode"], () => {
592-
const lib = "./lib";
593-
const sizeBefore = getDirSize(lib);
592+
const sizeBefore = getDirSize(lkgDirectory);
594593
const seq = runSequence("LKGInternal", "VerifyLKG");
595-
const sizeAfter = getDirSize(lib);
594+
const sizeAfter = getDirSize(lkgDirectory);
596595
if (sizeAfter > (sizeBefore * 1.10)) {
597596
throw new Error("The lib folder increased by 10% or more. This likely indicates a bug.");
598597
}

scripts/build/getDirSize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ function getDirSize(root, seen = new Set()) {
2727
.reduce((acc, num) => acc + num, 0);
2828
}
2929

30-
exports.getDirSize = getDirSize;
30+
module.exports = getDirSize;

0 commit comments

Comments
 (0)