@erwininteractive/mvc 0.1.2 → 0.1.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.
package/dist/cli.js
CHANGED
|
@@ -32,16 +32,17 @@ async function initApp(dir, options = {}) {
|
|
|
32
32
|
}
|
|
33
33
|
// Copy app scaffold templates
|
|
34
34
|
copyDirRecursive(templateDir, targetDir);
|
|
35
|
-
// Rename dotfiles (npm doesn't publish
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
// Rename dotfiles (npm doesn't publish dotfiles, so we use .txt extensions)
|
|
36
|
+
const renames = [
|
|
37
|
+
["gitignore.txt", ".gitignore"],
|
|
38
|
+
["env.example.txt", ".env.example"],
|
|
39
|
+
];
|
|
40
|
+
for (const [src, dest] of renames) {
|
|
41
|
+
const srcPath = path_1.default.join(targetDir, src);
|
|
42
|
+
const destPath = path_1.default.join(targetDir, dest);
|
|
43
|
+
if (fs_1.default.existsSync(srcPath)) {
|
|
44
|
+
fs_1.default.renameSync(srcPath, destPath);
|
|
45
|
+
}
|
|
45
46
|
}
|
|
46
47
|
// Update package.json with app name and framework version
|
|
47
48
|
const appPackageJson = path_1.default.join(targetDir, "package.json");
|
package/package.json
CHANGED