Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

feat: rename configuration deno.dtsFilepaths to deno.dts_file #49

Merged
merged 2 commits into from
Feb 14, 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
8 changes: 4 additions & 4 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface WorkspaceFolderItem extends QuickPickItem {

interface SynchronizedConfiguration {
enable?: boolean;
dtsFilepaths?: string[];
dts_file?: string[];
import_map?: string;
}

Expand Down Expand Up @@ -206,13 +206,13 @@ class Extension {
}

withConfigValue(_config, config, "enable");
withConfigValue(_config, config, "dtsFilepaths");
withConfigValue(_config, config, "dts_file");
withConfigValue(_config, config, "import_map");

if (!config.dtsFilepaths) {
if (!config.dts_file) {
const dtsFilepath = this.denoInfo.dtsFilepath;
if (dtsFilepath) {
config.dtsFilepaths = [dtsFilepath];
config.dts_file = [dtsFilepath];
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deno.command.disable": "Deaktiviere Deno",
"deno.command.restart_server": "Starte den Deno Language Server neu",
"deno.config.enabled": "Steuert, ob Deno aktiviert ist oder nicht.\n\n**In der globalen Konfiguration nicht empfohlen**",
"deno.config.dtsFilepaths": "Der Dateipfad der Deno TypeScript-Deklarationsdatei (.d.ts).\n\nDies kann ein Pfad sein, der relativ zum Projektpfad ist, oder ein absoluter Pfad.\n\n**Wird in der globalen Konfiguration nicht empfohlen, ausser wenn Sie einen absoluten Pfad verwenden.**",
"deno.config.dts_file": "Der Dateipfad der Deno TypeScript-Deklarationsdatei (.d.ts).\n\nDies kann ein Pfad sein, der relativ zum Projektpfad ist, oder ein absoluter Pfad.\n\n**Wird in der globalen Konfiguration nicht empfohlen, ausser wenn Sie einen absoluten Pfad verwenden.**",
"deno.config.import_map": "Der Dateipfad einer import map.\n\nDies kann ein Pfad sein, der relativ zum Projektpfad ist, oder ein absoluter Pfad.\n\n**In der globalen Konfiguration nicht empfohlen**",
"deno.initializing": "Deno Language Server wird initialisiert ...",
"err.not_install_deno": "Konnte `deno` in Ihrem $PATH nicht finden. Bitte installieren Sie `deno` und starten Sie die Erweiterung neu.",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
false
]
},
"deno.dtsFilepaths": {
"deno.dts_file": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "%deno.config.dtsFilepaths%",
"markdownDescription": "%deno.config.dts_file%",
"scope": "resource",
"examples": [
"./deno.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.nl-nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deno.command.disable": "Schakel Deno uit",
"deno.command.restart_server": "Start Deno Language Server opnieuw",
"deno.config.enabled": "Bepaalt of Deno is ingeschakeld of niet.\n\n**Niet aanbevolen in globale configuratie**",
"deno.config.dtsFilepaths": "Het bestandspad van het Deno TypeScript-declaratiebestand (.d.ts).\n\nHet kan een pad zijn dat relatief is aan het projectpad, of een absoluut pad.\n\n**Niet aanbevolen in globale configuratie tenzij u een absoluut pad gebruikt.**",
"deno.config.dts_file": "Het bestandspad van het Deno TypeScript-declaratiebestand (.d.ts).\n\nHet kan een pad zijn dat relatief is aan het projectpad, of een absoluut pad.\n\n**Niet aanbevolen in globale configuratie tenzij u een absoluut pad gebruikt.**",
"deno.config.import_map": "Het bestandspad van een 'import map'.\n\nHet kan een pad zijn dat relatief is aan het projectpad, of een absoluut pad\n\n**Niet aanbevolen in globale configuratie**",
"deno.initializing": "Deno Language Server initialiseren ...",
"err.not_install_deno": "Kon `deno` niet vinden in uw $PATH. Installeer `deno` en start de extensie opnieuw.",
Expand Down
2 changes: 1 addition & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deno.command.disable": "Disable Deno",
"deno.command.restart_server": "Restart Deno Language Server",
"deno.config.enabled": "Controls whether Deno is enabled or not.\n\n**Not recommended in global configuration**",
"deno.config.dtsFilepaths": "The file path of the Deno TypeScript declaration file (.d.ts).\n\nIt can be a path that is relative to the project root, or an absolute path.\n\n**Not recommended in global configuration unless you are using an absolute path.**",
"deno.config.dts_file": "The file path of the Deno TypeScript declaration file (.d.ts).\n\nIt can be a path that is relative to the project root, or an absolute path.\n\n**Not recommended in global configuration unless you are using an absolute path.**",
"deno.config.import_map": "The file path of an import map.\n\nIt can be a path that is relative to the project root, or an absolute path.\n\n**Not recommended in global configuration**",
"deno.initializing": "Initializing Deno Language Server...",
"err.not_install_deno": "Could not find `deno` in your $PATH. Please install `deno`, then restart the extension.",
Expand Down
2 changes: 1 addition & 1 deletion package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deno.command.disable": "禁用 Deno",
"deno.command.restart_server": "重启 Deno 语言服务器",
"deno.config.enabled": "是否启用 Deno。\n\n**不推荐在全局配置中设置**",
"deno.config.dtsFilepaths": "Typescript 的声明文件(.d.ts)路径。\n\n它可以是相对于项目目录的相对路径或者是绝对路径。\n\n**不推荐在全局配置中设置**",
"deno.config.dts_file": "Typescript 的声明文件(.d.ts)路径。\n\n它可以是相对于项目目录的相对路径或者是绝对路径。\n\n**不推荐在全局配置中设置**",
"deno.config.import_map": "Import Map 的文件路径。\n\n它可以是相对于项目目录的相对路径或者是绝对路径。\n\n**不推荐在全局配置中设置**",
"deno.initializing": "正在初始化 Deno 语言服务器...",
"err.not_install_deno": "在 $PATH 变量中找不到 Deno。请在设置后重新启动扩展。",
Expand Down
2 changes: 1 addition & 1 deletion package.nls.zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"deno.command.disable": "禁用 Deno",
"deno.command.restart_server": "重啟 Deno 語言服務器",
"deno.config.enabled": "是否啟用 Deno。\n\n**不推薦在全局配置中設置**",
"deno.config.dtsFilepaths": "Typescript 的聲明文件(.d.ts)路徑。\n\n它可以是相對於項目目錄的相對路徑或者是絕對路徑。\n\n**不推薦在全局配置中設置**",
"deno.config.dts_file": "Typescript 的聲明文件(.d.ts)路徑。\n\n它可以是相對於項目目錄的相對路徑或者是絕對路徑。\n\n**不推薦在全局配置中設置**",
"deno.config.import_map": "Import Map 的文件路徑。\n\n它可以是相對於項目目錄的相對路徑或者是絕對路徑。\n\n**不推薦在全局配置中設置**",
"deno.initializing": "正在初始化 Deno 語言服務器...",
"err.not_install_deno": "在 $PATH 變量中找不到 Deno。請在設置後重新啟動擴展。",
Expand Down
4 changes: 2 additions & 2 deletions typescript-deno-plugin/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import merge from "deepmerge";

export type DenoPluginConfig = {
enable: boolean;
dtsFilepaths?: string[];
dts_file?: string[];
import_map: string;
};

export class ConfigurationManager {
private static readonly defaultConfiguration: DenoPluginConfig = {
enable: true,
dtsFilepaths: [],
dts_file: [],
import_map: ""
};

Expand Down
2 changes: 1 addition & 1 deletion typescript-deno-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DenoPlugin implements ts_module.server.PluginModule {

// Get typescript declaration File
const dtsFilepaths = Deno.declarationFile
.concat(this.configurationManager.config.dtsFilepaths || [])
.concat(this.configurationManager.config.dts_file || [])
.map(filepath => {
const absoluteFilepath = path.isAbsolute(filepath)
? filepath
Expand Down