Skip to content

[Draft] Add generated client files to fcm #1344

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
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'));
Loading