From c998b026c157fe53348a3645b35ac7e9be51e75d Mon Sep 17 00:00:00 2001 From: Maceo Thompson Date: Wed, 30 Jun 2021 20:26:11 +0000 Subject: [PATCH 1/3] Update Gulpfile to copy files required for generated code to run. --- gulpfile.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9ca1aeb941..30f94c232d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -101,18 +101,33 @@ gulp.task('compile', function() { */ gulp.task('compile_test', function() { return gulp.src(paths.test) - // Compile Typescript into .js and .d.ts files + // Compile Typescript ianto .js and .d.ts files .pipe(buildTest()) }); gulp.task('copyTypings', function() { - return gulp.src(['src/index.d.ts', 'src/firebase-namespace.d.ts']) + return gulp.src([ + 'src/index.d.ts', + 'src/firebase-namespace.d.ts', + 'src/**/protos/*.d.ts', + ]) // Add header .pipe(header(banner)) .pipe(gulp.dest(paths.build)) }); -gulp.task('compile_all', gulp.series('compile', 'copyTypings', 'compile_test')); +gulp.task('copyJSON', function() { + return gulp.src([ + 'src/**/protos/*.json', + // This isn't ideal, but doing something like + // 'src/generated/**/*.json' results in incorrect paths in the /lib dir + 'src/**/*.json' + ]) + .pipe(gulp.dest(paths.build)) +}); + +gulp.task('compile_all', gulp.series('compile', 'copyTypings', + 'copyJSON', 'compile_test')); // Regenerates js every time a source file changes gulp.task('watch', function() { @@ -120,7 +135,7 @@ gulp.task('watch', function() { }); // Build task -gulp.task('build', gulp.series('cleanup', 'compile', 'copyTypings')); +gulp.task('build', gulp.series('cleanup', 'compile', 'copyTypings', 'copyJSON')); // Default task gulp.task('default', gulp.series('build')); From 77604c7e3586c2794f889053617a921db19a2206 Mon Sep 17 00:00:00 2001 From: Maceo Thompson Date: Wed, 30 Jun 2021 20:29:06 +0000 Subject: [PATCH 2/3] Fix introduced typo on 104 --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 30f94c232d..bc8d249d03 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -101,7 +101,7 @@ gulp.task('compile', function() { */ gulp.task('compile_test', function() { return gulp.src(paths.test) - // Compile Typescript ianto .js and .d.ts files + // Compile Typescript into .js and .d.ts files .pipe(buildTest()) }); From 46ee7e370b324805074b232e71a931cc688f5e5a Mon Sep 17 00:00:00 2001 From: Maceo Thompson Date: Thu, 1 Jul 2021 18:33:36 +0000 Subject: [PATCH 3/3] Remove redundant glob from `copyJson()` task --- gulpfile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index bc8d249d03..ce01e04eec 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -118,7 +118,6 @@ gulp.task('copyTypings', function() { gulp.task('copyJSON', function() { return gulp.src([ - 'src/**/protos/*.json', // This isn't ideal, but doing something like // 'src/generated/**/*.json' results in incorrect paths in the /lib dir 'src/**/*.json'