Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Add generated client files to fcm #1344

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
ignorePatterns: ["src/generated/*"],
rules: {
// Following checks are temporarily disabled. We shall incrementally enable them in the
// future, fixing any violations as we go.
Expand Down
20 changes: 17 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,35 @@ gulp.task('compile_test', function() {
});

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([
// 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() {
gulp.watch(paths.src.concat(paths.test), { ignoreInitial: false }, gulp.series('compile_all'));
});

// 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'));