如何将 AWS CodeStar 用于 Angular 应用程序?

SP-*_*-TY 5 continuous-integration amazon-web-services continuous-deployment angular aws-codestar

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

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

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

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

提前致谢!

Chr*_*ley 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"
  }
}
Run Code Online (Sandbox Code Playgroud)

],