Skip to content

Commit 9632d07

Browse files
committed
feat (language): 优化 TypeScript 命令
1 parent 972a81c commit 9632d07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src-tauri/src/plugins/typescript.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl LanguagePlugin for TypeScriptPlugin {
3636
let processed_cmd = if run_cmd.contains("$classname") {
3737
let class_name = if file_path.ends_with(&self.get_file_extension().to_string())
3838
{
39-
file_path.replace(&self.get_file_extension().to_string(), ".js")
39+
file_path.replace(&self.get_file_extension().to_string(), "js")
4040
} else {
4141
file_path.to_string()
4242
};
@@ -59,7 +59,7 @@ impl LanguagePlugin for TypeScriptPlugin {
5959
PluginConfig {
6060
enabled: true,
6161
language: String::from("typescript"),
62-
before_compile: Some(String::from("tsc $filename")),
62+
before_compile: Some(String::from("tsc --lib es2017,dom --skipLibCheck $filename")),
6363
extension: String::from("ts"),
6464
execute_home: None,
6565
run_command: Some(String::from("node $classname")),

0 commit comments

Comments
 (0)