Angular-cli: Allow/Enable configurations for `ng deploy` commands

Created on 29 Mar 2020  路  3Comments  路  Source: angular/angular-cli

馃悶 Bug report

Command (mark with an x)


  • [ ] new
  • [ ] build
  • [ ] serve
  • [x] deploy
  • [ ] test
  • [ ] e2e
  • [ ] generate
  • [ ] add
  • [ ] update
  • [ ] lint
  • [ ] xi18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [ ] version
  • [ ] doc

Is this a regression?

Probably not

Description

Not sure if this is a bug or a feature request.

Allow specifying a --configuration='production' for ng deploy commands.
This should simply read from the corresponding configuration and apply those settings on top of settings found in options under the deploy config.

According to docs, this should work for other types of tasks such as build/serve/lint: https://angular.io/guide/cli-builder#target-configuration

馃敩 Minimal Reproduction

"deploy": {
          "builder": "@angular/fire:deploy",
          "options": {
            "buildTarget": "my-project:build",
            "firebaseProject": "dev"
          },
          "configurations": {
            "production": {
              "buildTarget": "my-project:build:production",
              "firebaseProject": "prod"
            }
          }
        }

This command works:
ng deploy myProject

This command does not work, even with correct configuration:
ng deploy myProject --configuration production

馃敟 Exception or Error

Unknown option: '--configuration'
Unknown option: 'production'

馃實 Your Environment

Angular CLI 9

angulacli low broken bufix

All 3 comments

@george43g, thanks for reporting this.

Indeed this is a bug which should be trivial to fix. I鈥檒l take a look at it tomorrow!

Awesome! I'll let some package maintainers know about this. Should result in some cleaner code/setups. Hopefully, the pull request will be merged in soon.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings