我正在使用@angular/fire
在Firebase Hosting上部署我的应用程序。另外,每次构建应用程序时我都会预渲染我的应用程序,因此我制作了以下npm脚本:
"scripts": {
...
"build:client-and-server-bundles": "ng build --prod && ng run portfolio:server:production",
"build:prerender": "npm run build:client-and-server-bundles && node prerender.js",
}
所以我的问题是,当我运行ng deploy
时,我该如何告诉angular应该只运行build:prerender
然后上传到firebase?
这些是当前脚本:
"scripts": {
"ng": "ng",
"deploy": "npm run build:prerender",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"serve": "node serve-script",
"compile:server": "webpack --config webpack.server.config.js --progress --colors",
"serve:ssr": "node dist/server",
"build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
"build:client-and-server-bundles": "ng build --prod && ng run portfolio:server:production",
"build:prerender": "npm run build:client-and-server-bundles && node prerender.js",
"serve:prerender": "http-server dist/browser -c-1"
},