5

谁能告诉我如何为 Angular 应用程序配置 AWS CodeStar 项目?

目前没有针对 Angular 的特定项目模板。但我看到有 Node.js + Lambda 项目模板。

我不知道它是如何工作的,因为每当我进行一些更改时,我都会将 dist/ 文件夹下的文件部署到服务器。

是否可以将 CodeStar 用于 Angular 项目?

提前致谢!

4

1 回答 1

3

我正在使用 Angular CLI。使用 Node.js + Lamda 模板,并让构建生成公用文件夹。

转到您的 .angular-cli.json 文件,并将 apps.outDir 修改为“../public”而不是“dist”

"apps": [
{
  "root": "src",
  "outDir": "../public", <-- RIGHT HERE (it tells the build where to compile to)
  "assets": [
    "assets",
    "favicon.ico"
  ],
  "index": "index.html",
  "main": "main.ts",
  "polyfills": "polyfills.ts",
  "test": "test.ts",
  "tsconfig": "tsconfig.app.json",
  "testTsconfig": "tsconfig.spec.json",
  "prefix": "app",
  "styles": [
    "styles.css"
  ],
  "scripts": [],
  "environmentSource": "environments/environment.ts",
  "environments": {
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts"
  }
}

],

于 2017-11-02T18:37:23.123 回答