Skip to content

Commit 7529a37

Browse files
committed
创建 src 目录
1 parent 0c50aa9 commit 7529a37

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
146146
fs::write(output_path, contents).unwrap_or_else(|_| panic!("failed to create file, path: {}", name));
147147
});
148148

149+
// 创建 src 目录
150+
output_dir.push("src");
151+
fs::create_dir(output_dir.as_path())?;
152+
149153
Ok(())
150154
}

src/templates/jsconfig.json.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818

1919
"target": "ES2022",
2020
"lib": ["ES2022", "DOM", "DOM.Iterable"],
21+
{{#if withVue}}
22+
"types": ["@types/node", "vite/client"],
23+
{{else}}
2124
"types": ["@types/node"],
25+
{{/if}}
2226

2327
"baseUrl": ".",
2428
"paths": {

0 commit comments

Comments
 (0)