-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
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.ngConfigto get default settings and use it instead to constructbuildOptions -
Add output-path flag to be consistent with other commands.
_Required change:_ Add another option toavailableOptions
-
- Build Command
- Create a BuildCommand in addon/ng2/commands. This would be a wrapper of the ember cli build command but would read default settings from angular-cli.json
- Serve Command
- Create a ServeCommand in addon/ng2/commands. This would be a wrapper of the ember cli serve command but would read default settings from angular-cli.json
Note: As I have told @hansl I am willing to go through the design process and work on this.