create-vexcms 0.0.4 → 0.0.5
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/index.js
CHANGED
|
@@ -98,7 +98,9 @@ async function copyTemplate(framework, targetPath) {
|
|
|
98
98
|
overwrite: false,
|
|
99
99
|
errorOnExist: false,
|
|
100
100
|
filter: (src) => {
|
|
101
|
-
|
|
101
|
+
const basename = src.split("/").pop() ?? "";
|
|
102
|
+
const skipFiles = ["_gitignore", "_env.example", "_prettierrc", "_prettierignore"];
|
|
103
|
+
return !skipFiles.includes(basename);
|
|
102
104
|
}
|
|
103
105
|
});
|
|
104
106
|
const sourceGitignore = join(templatePath, "_gitignore");
|
|
@@ -109,6 +111,18 @@ async function copyTemplate(framework, targetPath) {
|
|
|
109
111
|
errorOnExist: false
|
|
110
112
|
});
|
|
111
113
|
}
|
|
114
|
+
const dotfileRenames = [
|
|
115
|
+
["_env.example", ".env.example"],
|
|
116
|
+
["_prettierrc", ".prettierrc"],
|
|
117
|
+
["_prettierignore", ".prettierignore"]
|
|
118
|
+
];
|
|
119
|
+
for (const [from, to] of dotfileRenames) {
|
|
120
|
+
const source = join(templatePath, from);
|
|
121
|
+
const target = join(targetPath, to);
|
|
122
|
+
if (await fs2.pathExists(source)) {
|
|
123
|
+
await fs2.copy(source, target, { overwrite: false, errorOnExist: false });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
112
126
|
}
|
|
113
127
|
async function overlayTemplate({ overlayDir, targetDir }) {
|
|
114
128
|
await fs2.copy(overlayDir, targetDir, { overwrite: true });
|
|
@@ -174,6 +188,7 @@ var VexFrameworkInstaller = class {
|
|
|
174
188
|
await fs3.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
175
189
|
const envLocalPath = path.join(this.targetPath, ".env.local");
|
|
176
190
|
const envContent = `NEXT_PUBLIC_SITE_URL=http://localhost:${port}
|
|
191
|
+
BETTER_AUTH_SECRET=""
|
|
177
192
|
`;
|
|
178
193
|
await fs3.writeFile(envLocalPath, envContent);
|
|
179
194
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
|
2
|
+
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
|
3
|
+
# when you add new variables to `.env`.
|
|
4
|
+
|
|
5
|
+
# This file will be committed to version control, so make sure not to have any
|
|
6
|
+
# secrets in it. If you are cloning this repo, create a copy of this file named
|
|
7
|
+
# ".env" and populate it with your secrets.
|
|
8
|
+
|
|
9
|
+
# When adding additional environment variables, the schema in "/src/env.js"
|
|
10
|
+
# should be updated accordingly.
|
|
11
|
+
|
|
12
|
+
NEXT_PUBLIC_CONVEX_URL=""
|
|
13
|
+
NEXT_PUBLIC_CONVEX_SITE_URL=""
|
|
14
|
+
|
|
15
|
+
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
|
|
16
|
+
BETTER_AUTH_SECRET=""
|
|
17
|
+
|
|
18
|
+
# {{ENV_OAUTH_VARS}}
|
|
19
|
+
|
|
File without changes
|
|
File without changes
|