create-fesd-app 1.0.0-bate.80 → 1.0.0-bate.82
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/bin/create-fesd-app.mjs +11 -7
- package/package.json +1 -1
package/bin/create-fesd-app.mjs
CHANGED
@@ -101,19 +101,23 @@ const createPackageJson = async (packagePath, projectName) => {
|
|
101
101
|
}
|
102
102
|
};
|
103
103
|
|
104
|
-
const createGitignore = async (packagePath
|
104
|
+
const createGitignore = async (packagePath) => {
|
105
|
+
const npmignorePath = packagePath + "/.npmignore"
|
106
|
+
const gitignorePath = packagePath + "/.gitignore"
|
107
|
+
|
105
108
|
try {
|
106
|
-
const data = await promisesFs.readFile(
|
107
|
-
await promisesFs.writeFile(
|
108
|
-
await promisesFs.unlink(
|
109
|
+
// const data = await promisesFs.readFile(npmignorePath, 'utf8');
|
110
|
+
// await promisesFs.writeFile(gitignorePath, data, 'utf8');
|
111
|
+
// await promisesFs.unlink(npmignorePath);
|
112
|
+
|
113
|
+
await promisesFs(npmignorePath, gitignorePath);
|
114
|
+
|
109
115
|
|
110
116
|
} catch (error) {
|
111
117
|
console.error(`Error editing .gitignore: ${error}`);
|
112
118
|
}
|
113
119
|
};
|
114
120
|
|
115
|
-
|
116
|
-
|
117
121
|
const runComman = (command) => new Promise((resolve, reject) =>
|
118
122
|
exec(command, (error, stdout, stderr) => {
|
119
123
|
if (error) {
|
@@ -141,7 +145,7 @@ const installSetup = async (projectPath, projectName) => {
|
|
141
145
|
projectName
|
142
146
|
);
|
143
147
|
|
144
|
-
await createGitignore(projectPath
|
148
|
+
await createGitignore(projectPath)
|
145
149
|
|
146
150
|
console.log(" ")
|
147
151
|
|