Skip to content

Commit

Permalink
feat: disuse config 'outputMarkdownSeparately'
Browse files Browse the repository at this point in the history
  • Loading branch information
uctakeoff committed Jan 13, 2022
1 parent 2bbdd89 commit 9ebf918
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

* workspace counter in status bar.

## [2.4.0]

### Removed

- disuse config 'outputMarkdownSeparately'

## [2.3.0]

### Fixed
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-counter",
"displayName": "VS Code Counter",
"description": "Count lines of code in many programming languages.",
"version": "2.3.0",
"version": "2.4.0",
"publisher": "uctakeoff",
"author": {
"name": "Ushiyama Kentaro"
Expand Down Expand Up @@ -167,11 +167,6 @@
"type": "boolean",
"default": true
},
"VSCodeCounter.outputMarkdownSeparately": {
"description": "%configuration.outputMarkdownSeparately.description%",
"type": "boolean",
"default": true
},
"VSCodeCounter.outputPreviewType": {
"description": "%configuration.outputPreviewType.description%",
"type": "string",
Expand Down
1 change: 0 additions & 1 deletion package.nls.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"configuration.outputAsText.description": "結果をテキストファイルで出力する.",
"configuration.outputAsCSV.description": "結果をCSVファイルで出力する.",
"configuration.outputAsMarkdown.description": "結果をMarkdown形式で出力する.",
"configuration.outputMarkdownSeparately.description": "Markdown結果を概要と詳細で分けて出力する.",
"configuration.outputPreviewType.description": "カウント後にプレビューする出力ファイルの種類.",
"configuration.saveLocation.description": "集めた言語設定を保存する場所を指定する.",
"configuration.languages.description": "保存された言語設定.",
Expand Down
1 change: 0 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"configuration.outputAsText.description": "Whether to output the result as a text file.",
"configuration.outputAsCSV.description": "Whether to output the result as a CSV file.",
"configuration.outputAsMarkdown.description": "Whether to output the result as a Markdown file.",
"configuration.outputMarkdownSeparately.description": "Whether to output summary and details separately.",
"configuration.outputPreviewType.description": "Type of output file to preview after counting.",
"configuration.saveLocation.description": "Specify where to store the collected language configurations.",
"configuration.languages.description": "Saved Language Configurations.",
Expand Down
10 changes: 2 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const loadConfig = () => {
outputAsText: conf.get('outputAsText', true),
outputAsCSV: conf.get('outputAsCSV', true),
outputAsMarkdown: conf.get('outputAsMarkdown', true),
outputMarkdownSeparately: conf.get('outputMarkdownSeparately', true),
};
}
type Config = ReturnType<typeof loadConfig>;
Expand Down Expand Up @@ -544,13 +543,8 @@ const outputResults = async (date: Date, targetDirUri: vscode.Uri, results: Resu
}
if (conf.outputAsMarkdown) {
try {
let resultsUri: vscode.Uri;
if (conf.outputMarkdownSeparately) {
await writeTextFile(outputDirUri, `${outputFilename}-details.md`, resultTable.toMarkdownDetails(date, `${outputFilename}.md`));
resultsUri = await writeTextFile(outputDirUri, `${outputFilename}.md`, resultTable.toMarkdownSummary(date, `${outputFilename}-details.md`));
} else {
resultsUri = await writeTextFile(outputDirUri, `${outputFilename}.md`, resultTable.toMarkdown(date));
}
await writeTextFile(outputDirUri, `${outputFilename}-details.md`, resultTable.toMarkdownDetails(date, `${outputFilename}.md`));
const resultsUri = await writeTextFile(outputDirUri, `${outputFilename}.md`, resultTable.toMarkdownSummary(date, `${outputFilename}-details.md`));
if (conf.outputPreviewType === 'markdown') {
vscode.commands.executeCommand("markdown.showPreview", resultsUri);
}
Expand Down

0 comments on commit 9ebf918

Please sign in to comment.