Skip to content

Splitting the index.d.ts file into smaller files #751

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

Merged
merged 4 commits into from
Mar 17, 2020
Merged
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
4 changes: 2 additions & 2 deletions docgen/generate-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const repoPath = path.resolve(`${__dirname}/..`);
// Command-line options.
const { source: sourceFile } = yargs
.option('source', {
default: `${repoPath}/src/index.d.ts`,
default: `${repoPath}/src/*.d.ts`,
describe: 'Typescript source file(s)',
type: 'string'
})
Expand Down Expand Up @@ -283,7 +283,7 @@ function addFirestoreTypeAliases() {
let contentBlock = firestoreHeader;
lineReader.on('line', (line) => {
line = line.trim();
if (line.startsWith('export import') && line.indexOf('_firestore.')) {
if (line.startsWith('export import') && line.indexOf('_firestore.') >= 0) {
const typeName = line.split(' ')[2];
if (firestoreExcludes.indexOf(typeName) === -1) {
contentBlock += `
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ gulp.task('copyDatabase', function() {
});

gulp.task('copyTypings', function() {
return gulp.src('src/index.d.ts')
return gulp.src('src/*.d.ts')
// Add header
.pipe(header(banner))

Expand Down
Loading