version: 0.2

#env:
#variables:
# key: "value"
# key: "value"
#batch:
#fast-fail: true
#build-list:
#build-matrix:
#build-graph:
phases:
  install:
    #If you use the Ubuntu standard image 2.0 or later, you must specify runtime-versions.
    #If you specify runtime-versions and use an image other than Ubuntu standard image 2.0, the build fails.
    #runtime-versions:
    # name: version
    # name: version
    runtime-versions:
      nodejs: 12
    commands:
      - echo Installing
  pre_build:
    commands:
      - echo Installing source NPM dependencies.
      - npm install -g @angular/cli@7.3.10
      - npm install
  build:
    run-as: root
    on-failure: ABORT
    commands:
      - npm run build
      - cp appspec.yml dist/
      # - command
  post_build:
    commands:
      # - aws s3 cp dist s3://facework-artifact --recursive

      - echo Build completed on `date`
      # - command
artifacts:
  files:
    - "**/*"
  # - location
  #name: $(date +%Y-%m-%d)
  #discard-paths: yes
  base-directory: "dist*"
