Skip to content

Proposal: Support default custom output path #817

@JonCubed

Description

@JonCubed

Problem:
Currently there is no official support for setting a default custom path. This can be important for those that have different project structures or use a different server to host angular2 such as asp.net core which expects static files to be in a folder called wwwroot/.

There is also not a consistent way to unofficially set a default value for custom output path. For ng buld and ng serve as they are still just the default commands in ember cli you can create a .ember-cli file with the following and it will work

{
    "output-path": "wwwroot/"
}

However, for ng test it has the output folder hard-coded to dist/ and as it is, as an add-on command would not use .ember-cli

Proposal:

I was only able to find three commands that use an output-path flag, build, serve, test. The following are what I think would need to change or be completed to support this feature.

  • General
    • Support output path in angular-cli.json as a sub property of defaults. Would probably be called outputPath to match the cli flag output-path and the format in angular-cli.json already. Would look something like:

      {
          "defaults": {
              "outputPath": "wwwroot/"
         }
      }
      

      _Required change:_ Update angular-cli.json schema

  • Test command
    • Remove hard-coded output path and instead retrieve it from

      _Required change:_ Use this.project.ngConfig to get default settings and use it instead to construct buildOptions

    • Add output-path flag to be consistent with other commands.
      _Required change:_ Add another option to availableOptions

  • Build Command
  • Serve Command

Note: As I have told @hansl I am willing to go through the design process and work on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussioneffort1: easy (hours)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions