1diff --git a/generator/src/init.js b/generator/src/init.js
2index 06386ff..7127dae 100644
3--- a/generator/src/init.js
4+++ b/generator/src/init.js
5@@ -6,6 +6,20 @@ import { fileURLToPath } from "url";
6 const __filename = fileURLToPath(import.meta.url);
7 const __dirname = path.dirname(__filename);
8
9+let walknDo = function(somePath, doStuff) {
10+ doStuff(somePath, true);
11+ const dir = fs.readdirSync(somePath)
12+ dir.forEach((i) => {
13+ let p = path.join(somePath, i);
14+ const s = fs.statSync(p)
15+ if (s.isDirectory()) {
16+ walknDo(p, doStuff)
17+ } else {
18+ doStuff(p);
19+ }
20+ });
21+}
22+
23 /**
24 * @param {string} name
25 */
26@@ -18,6 +32,13 @@ export async function run(name) {
27 if (!fs.existsSync(name)) {
28 try {
29 await fsExtra.copy(template, appRoot);
30+ walknDo(appRoot, (file, isDir) => {
31+ if (isDir) {
32+ fs.chmodSync(file, 0o755);
33+ } else {
34+ fs.chmodSync(file, 0o644);
35+ }
36+ });
37 fs.renameSync(
38 path.resolve(appRoot, "gitignore"),
39 path.resolve(appRoot, ".gitignore")