create-vidra-app 0.1.0 → 0.1.2
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 +1 -1
- package/dist/index.js +7 -5
- package/package.json +1 -1
- package/templates/react-vite/NuGet.Config +1 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -177,7 +177,7 @@ var main = async () => {
|
|
|
177
177
|
console.log();
|
|
178
178
|
const isMonorepo = fs2.existsSync(path2.join(LOCAL_SDK_DIR, "package.json"));
|
|
179
179
|
const localFeedExists = isMonorepo && fs2.existsSync(LOCAL_FEED_DIR);
|
|
180
|
-
const
|
|
180
|
+
const localFeedSource = localFeedExists ? ` <add key="vidra-local" value="${toTextPath(LOCAL_FEED_DIR)}" />` : "";
|
|
181
181
|
const cliRef = isMonorepo ? `file:${toTextPath(LOCAL_CLI_DIR)}` : `^${VIDRA_VERSION}`;
|
|
182
182
|
const sdkRef = isMonorepo ? `file:${toTextPath(LOCAL_SDK_DIR)}` : `^${SDK_VERSION}`;
|
|
183
183
|
const replacements = {
|
|
@@ -189,7 +189,7 @@ var main = async () => {
|
|
|
189
189
|
"{{cliVersion}}": cliRef,
|
|
190
190
|
"{{vidraVersion}}": VIDRA_VERSION,
|
|
191
191
|
"{{sdkVersion}}": sdkRef,
|
|
192
|
-
"{{
|
|
192
|
+
"{{localFeedSource}}": localFeedSource
|
|
193
193
|
};
|
|
194
194
|
const templateDir = path2.join(TEMPLATES_DIR, "react-vite");
|
|
195
195
|
await scaffoldDir(templateDir, root, replacements);
|
|
@@ -200,9 +200,11 @@ var main = async () => {
|
|
|
200
200
|
`dotnet sln ${slnFile} add src/${projectName}.Host/${projectName}.Host.csproj`,
|
|
201
201
|
root
|
|
202
202
|
);
|
|
203
|
-
const uiDir = path2.join(root, "ui");
|
|
204
203
|
console.log(chalk2.dim(" Installing npm dependencies..."));
|
|
205
|
-
const
|
|
204
|
+
const uiDir = path2.join(root, "ui");
|
|
205
|
+
const rootNpmOk = tryExec("npm install", root);
|
|
206
|
+
const uiNpmOk = tryExec("npm install", uiDir);
|
|
207
|
+
const npmOk = rootNpmOk && uiNpmOk;
|
|
206
208
|
console.log();
|
|
207
209
|
console.log(chalk2.green(" Done! ") + "Your Vidra app is ready.\n");
|
|
208
210
|
if (localFeedExists) {
|
|
@@ -225,7 +227,7 @@ var main = async () => {
|
|
|
225
227
|
console.log();
|
|
226
228
|
if (!npmOk) {
|
|
227
229
|
console.log(
|
|
228
|
-
chalk2.yellow(" Note: ") + "`npm install` had errors.
|
|
230
|
+
chalk2.yellow(" Note: ") + "`npm install` had errors. Re-run " + chalk2.cyan("npm install") + " in the project root and in " + chalk2.cyan("ui/") + " to retry.\n"
|
|
229
231
|
);
|
|
230
232
|
}
|
|
231
233
|
console.log(chalk2.bold(" Next steps:\n"));
|
package/package.json
CHANGED