mango-cms 0.3.22 → 0.3.23
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/cli.js +12 -2
- package/default/package.json +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -397,9 +397,15 @@ Then run it from your project root as usual:
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
// Ensure UI dependencies are installed before running Nuxt.
|
|
400
|
+
// Pass the project root so the postinstall (nuxt prepare) can resolve
|
|
401
|
+
// this project's mango/config instead of failing inside node_modules.
|
|
400
402
|
if (!fs.existsSync(path.join(uiDir, 'node_modules'))) {
|
|
401
403
|
console.log('Installing Mango UI dependencies...');
|
|
402
|
-
execSync('npm install', {
|
|
404
|
+
execSync('npm install', {
|
|
405
|
+
cwd: uiDir,
|
|
406
|
+
stdio: 'inherit',
|
|
407
|
+
env: { ...process.env, MANGO_PROJECT_ROOT: userProjectRoot, MANGO_UI_PORT: String(uiPort) }
|
|
408
|
+
});
|
|
403
409
|
}
|
|
404
410
|
|
|
405
411
|
// Map mango actions to Nuxt commands. `start` serves a production build.
|
|
@@ -804,7 +810,11 @@ async function manageUiPM2Process(settings, mangoCmsRoot, userProjectRoot) {
|
|
|
804
810
|
// Install deps + build the Nuxt app (reads this project's mango/config).
|
|
805
811
|
if (!fs.existsSync(path.join(uiDir, 'node_modules'))) {
|
|
806
812
|
console.log('Installing Mango UI dependencies...');
|
|
807
|
-
execSync('npm install', {
|
|
813
|
+
execSync('npm install', {
|
|
814
|
+
cwd: uiDir,
|
|
815
|
+
stdio: 'inherit',
|
|
816
|
+
env: { ...process.env, MANGO_PROJECT_ROOT: userProjectRoot, MANGO_UI_PORT: String(uiPort) }
|
|
817
|
+
});
|
|
808
818
|
}
|
|
809
819
|
console.log(`Building Mango UI (${ejected ? 'ejected' : 'bundled'})...`);
|
|
810
820
|
execSync('npx nuxt build', {
|
package/default/package.json
CHANGED