create-wowo 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +31 -3
  2. package/package.json +2 -2
package/index.mjs CHANGED
@@ -58,11 +58,39 @@ const makeDir = (folderName) => {
58
58
  );
59
59
  }
60
60
  };
61
+ const gitCode = `
62
+ # Logs
63
+ logs
64
+ *.log
65
+ npm-debug.log*
66
+
67
+ # Dependency directories
68
+ node_modules/
69
+ dist/
70
+ dist-ssr/
71
+ *.local
72
+
73
+ # Editor folders
74
+ .vscode/*
75
+ !.vscode/extensions.json
76
+ !.vscode/settings.json
77
+ .idea/
78
+ .DS_Store
79
+
80
+ # Workspaces
81
+ *.pnp
82
+ *.pnp.js
83
+
84
+ `;
85
+ const makeGitignore = () => {
86
+ const file = path.join(targetDir, ".gitignore");
87
+ fs.writeFileSync(file, gitCode);
88
+ console.log(` ${colors.green}#${colors.reset} Membuat file: .gitignore`);
89
+ };
61
90
 
62
91
  const filesToCopy = [
63
92
  "package.json",
64
93
  "index.html",
65
- ".gitignore",
66
94
  "vite.config.js",
67
95
  "public/robots.txt",
68
96
  ".vscode/extensions.json",
@@ -77,7 +105,7 @@ const filesToCopy = [
77
105
  ];
78
106
 
79
107
  filesToCopy.forEach(copyTemplate);
80
-
108
+ makeGitignore();
81
109
  makeDir("src/asset");
82
110
 
83
111
  console.log(`
@@ -86,6 +114,6 @@ ${colors.green}${colors.bold} ${name} Berhasil dibuat!${colors.reset}
86
114
  ${colors.bold}Langkah selanjutnya:${colors.reset}
87
115
  ${isCurrentDir ? "" : `${colors.cyan} cd ${name}${colors.reset}\n`}${colors.cyan} npm install
88
116
  npm run dev${colors.reset}
89
-
117
+ ${colors.cyan} atau pakai package manager lain${colors.reset}
90
118
  ${colors.bold}Happy coding with Wowojs! :)${colors.reset}
91
119
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-wowo",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "membuat framework wowojs otomatis",
5
5
  "main": "index.mjs",
6
6
  "type": "module",
@@ -15,6 +15,6 @@
15
15
  "test": "echo \"Error: no test specified\" && exit 1"
16
16
  },
17
17
  "keywords": [],
18
- "author": "",
18
+ "author": "Devied Rahmadsyah",
19
19
  "license": "ISC"
20
20
  }