Skip to content

Commit

Permalink
fix breakages in main
Browse files Browse the repository at this point in the history
  • Loading branch information
e111077 committed Sep 20, 2023
1 parent 276d2f0 commit b7add81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"dependencies": ["./catalog:build:prod"]
},
"build:analyzer": {
"command": "tsc -b scripts/analyzer/tsconfig.json --pretty",
"command": "tsc -b scripts/tsconfig.json --pretty",
"files": [
"scripts/tsconfig.json",
"scripts/analyzer/**/*.ts",
Expand Down
10 changes: 4 additions & 6 deletions scripts/analyzer/update-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
*/

import {AbsolutePath, Analyzer, createPackageAnalyzer,} from '@lit-labs/analyzer/package-analyzer.js';
import * as fs from 'fs/promises.js';
import * as fs from 'fs/promises';
import * as path from 'path';

import {analyzeElementApi, MdModuleInfo, MdPropertyInfo,} from './analyze-element.js';
import {analyzeElementApi, MdMethodParameterInfo, MdModuleInfo, MdPropertyInfo,} from './analyze-element.js';
import {docsToElementMapping} from './element-docs-map.js';
import {MarkdownTable} from './markdown-tree-builder.js';

type DocFileName = keyof typeof docsToElementMapping;

interface MarkdownTableSection {
name: string;
table: MarkdownTable;
Expand All @@ -40,7 +38,7 @@ async function updateApiDocs() {
// Analyzes the entire material-web repository.
const analyzer = createPackageAnalyzer(packagePath as AbsolutePath);
const documentationFileNames =
Object.keys(docsToElementMapping) as DocFileName[];
Object.keys(docsToElementMapping);

const filesWritten: Array<Promise<void>> = [];

Expand All @@ -66,7 +64,7 @@ async function updateApiDocs() {
* @returns A promise that resolves when the file has been updated.
*/
async function updateDocFileApiSection(
docFileName: DocFileName, analyzer: Analyzer, packagePath: string) {
docFileName: string, analyzer: Analyzer, packagePath: string) {
const elementEntrypoints = docsToElementMapping[docFileName];
// This is a data structure that describes an element and its associated API
// tables. e.g. a single section for MdFilledButton represents MdFilledButton
Expand Down

0 comments on commit b7add81

Please sign in to comment.