Skip to content

Commit

Permalink
chore: remove useless checks
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhanglong committed Apr 18, 2021
1 parent d4d7a08 commit 525ec98
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 71 deletions.
68 changes: 0 additions & 68 deletions docs/zh-CN/scales/Continuous.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions scripts/docs-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DocsGenerator {
.getDirectory('src/scales')
.getSourceFiles()
.filter((s) => s.getBaseName() !== 'base.ts');

return totalScaleSource.map((cs) => {
// 项目约定只有一个 class,我们可以放心地取下标 0
const targetClass = cs.getClasses()[0];
Expand Down Expand Up @@ -234,12 +235,14 @@ ${DocsGenerator.getMethodInfo(structure.methods)}

return {
mdContent: md,
mdFileName: `${structure.name}.md`,
mdFileName: `${structure.name.toLowerCase()}.md`,
};
});

mdResults.forEach((m) => {
fs.writeFileSync(path.resolve(process.cwd(), 'docs', 'zh-CN', 'scales', m.mdFileName), m.mdContent);
if (m.mdFileName !== 'continuous.md') {
fs.writeFileSync(path.resolve(process.cwd(), 'docs', 'zh-CN', 'scales', m.mdFileName), m.mdContent);
}
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/scales/linear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Linear extends Continuous<LinearOptions> {
interpolate: createInterpolate,
tickMethod: wilkinsonExtended,
tickCount: 5,
} as LinearOptions;
};
}

protected chooseTransform(): Transform {
Expand Down

0 comments on commit 525ec98

Please sign in to comment.