【问题标题】:How to use AWS CodeStar for Angular Applications?如何将 AWS CodeStar 用于 Angular 应用程序?
【发布时间】:2017-12-16 11:43:15
【问题描述】:

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

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

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

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

提前致谢!

【问题讨论】:

  • 一旦配置正确,这绝对是可能的。我正在调查它。自您发布此内容以来,您有任何进展吗?

标签: angular amazon-web-services continuous-integration continuous-deployment aws-codestar


【解决方案1】:

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

转到您的 .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"
  }
}

],

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-10
    • 2017-02-12
    • 2015-02-06
    • 2020-11-11
    • 2018-12-11
    • 2018-04-03
    • 2021-08-19
    相关资源
    最近更新 更多