-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base-href optional to support @angular/cli^10.0.0 #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AhsanAyaz If needed i can revert the formatting chances, it is just my auto formatting.
@@ -44,17 +44,17 @@ You have to configure the `with` portion of your workflow file so that the actio | |||
|
|||
| Key | Value Information | Type | Required | Default | | |||
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | | |||
| `angular_project_dir` | The directory of the angular project, in which all the commands will run. This is super handy when you have several projects within a workspace. Or have a demo angular project within a library. Defaults to current workspace directory | `with` | **Yes** | "" | | |||
| `angular_project_dir` | The directory of the angular project, in which all the commands will run. This is super handy when you have several projects within a workspace. Or have a demo angular project within a library. Defaults to current workspace directory | `with` | **Yes** | "./" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reflects the default values action.yml
file
baseHref = '/'; | ||
let baseHrefString = ''; | ||
if (baseHref && baseHref.length > 0) { | ||
baseHrefString = '--base-href=' + baseHref; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im basically just moving the appending into this if statement instead of at the end
Thanks for the PR @samuelnygaard 🙂 |
Since @angular/cli^10.0.0 have deprecated the base-href option for
ng build
and moved the configuration into theangular.json
file, this actions gives this errorUnknown option: '--base-href'
when using a repo with Angular CLI version 10.There i made the base-href semi-optional, so if you give an empty string or a null value as the input parameter, the parameter
--base-href=/
will not be appended to theng build
instruction.I have tested it and i works in my Actions.