create-my-app-template 1.0.0 → 1.2.0
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.
- package/index.js +15 -1
- package/package.json +1 -1
- package/template/_.gitignore +38 -0
package/index.js
CHANGED
|
@@ -17,8 +17,22 @@ const response = await prompts({
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
const templateDir = path.join(__dirname, "template");
|
|
20
|
+
const projectDir = path.join(targetDir, response.projectName)
|
|
20
21
|
|
|
21
|
-
await fs.copy(templateDir,
|
|
22
|
+
await fs.copy(templateDir, projectDir);
|
|
23
|
+
|
|
24
|
+
fixGitignore(projectDir);
|
|
25
|
+
|
|
26
|
+
function fixGitignore(projectPath) {
|
|
27
|
+
const oldPath = path.join(projectPath, '_gitignore');
|
|
28
|
+
const newPath = path.join(projectPath, '.gitignore');
|
|
29
|
+
|
|
30
|
+
if (fs.existsSync(oldPath)) {
|
|
31
|
+
// This renames 'gitignore' to '.gitignore'
|
|
32
|
+
fs.renameSync(oldPath, newPath);
|
|
33
|
+
console.log('Successfully created .gitignore');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
22
36
|
|
|
23
37
|
console.log("✔ Project created successfully!");
|
|
24
38
|
console.log(`cd ${response.projectName}`);
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
.DS_Store
|
|
12
|
+
dist
|
|
13
|
+
dist-ssr
|
|
14
|
+
coverage
|
|
15
|
+
*.local
|
|
16
|
+
|
|
17
|
+
# Editor directories and files
|
|
18
|
+
.vscode/*
|
|
19
|
+
!.vscode/extensions.json
|
|
20
|
+
.idea
|
|
21
|
+
*.suo
|
|
22
|
+
*.ntvs*
|
|
23
|
+
*.njsproj
|
|
24
|
+
*.sln
|
|
25
|
+
*.sw?
|
|
26
|
+
|
|
27
|
+
*.tsbuildinfo
|
|
28
|
+
|
|
29
|
+
.eslintcache
|
|
30
|
+
|
|
31
|
+
# Cypress
|
|
32
|
+
/cypress/videos/
|
|
33
|
+
/cypress/screenshots/
|
|
34
|
+
|
|
35
|
+
# Vitest
|
|
36
|
+
__screenshots__/
|
|
37
|
+
|
|
38
|
+
.__mf__temp/
|