Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "jest",
|
||||
"serve:ssr": "node scripts/serve-ssr.js",
|
||||
"build:ssr": "bun run build:prod && ng run goals-tracker:server:production",
|
||||
"build:ssr": "bun run build:prod",
|
||||
"prerender": "ng run goals-tracker:prerender"
|
||||
},
|
||||
"private": true,
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Loads .env and runs ng build.
|
||||
* Loads .env and runs ng build + server build.
|
||||
* Use for production build so process.env is populated for environment.prod.ts.
|
||||
*/
|
||||
require('dotenv').config();
|
||||
const { execSync } = require('child_process');
|
||||
execSync('ng build', { stdio: 'inherit' });
|
||||
const { join } = require('path');
|
||||
const ngPath = join(process.cwd(), 'node_modules', '.bin', 'ng');
|
||||
execSync(`"${ngPath}" build`, { stdio: 'inherit' });
|
||||
execSync(`"${ngPath}" run goals-tracker:server:production`, { stdio: 'inherit' });
|
||||
|
||||
Reference in New Issue
Block a user