From 6cc22630ed774cb5a68e5419eb79997962e2d8de Mon Sep 17 00:00:00 2001 From: Aaron Hardy Date: Mon, 9 Oct 2017 20:22:04 -0600 Subject: [PATCH] Tweaked build script to wait for types to be copied before marking complete. --- scripts/build.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 129d760..8afcd77 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -53,11 +53,14 @@ const build = () => { ], callback); }); }); + }, + (callback) => { + fs.createReadStream('./src/index.d.ts') + .pipe(fs.createWriteStream('./lib/index.d.ts')) + .on('finish', callback); } ], () => { console.log('Build complete.')}); }); - - fs.createReadStream('./src/index.d.ts').pipe(fs.createWriteStream('./lib/index.d.ts')); }; if (argv.watch) {