-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat(examples): build and consume an Angular workspace library #1633
feat(examples): build and consume an Angular workspace library #1633
Conversation
9b163b7
to
5d70941
Compare
@@ -9,8 +14,7 @@ architect( | |||
configuration_env_vars = ["NG_BUILD_CACHE"], | |||
data = glob( | |||
[ | |||
"src/*", | |||
"src/**", | |||
"src/**/*" |
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.
note these are not equivalent - starlark globbing **
doesn't match zero segments
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.
Oh good to know that.
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.
@alexeagle I double checked the docs again and it seems that **
does match zero segments
From https://docs.bazel.build/versions/master/be/functions.html#glob
/bar//*.txt matches every .txt file in every subdirectory of this package, if at least one directory on the resulting path is called bar, such as xxx/bar/yyy/zzz/a.txt or bar/a.txt (remember that ** also matches zero segments) or bar/zzz/a.txt
"@npm//@angular/cli", | ||
"@npm//@angular/core", | ||
"@npm//@angular/router", | ||
"@npm//@angular/platform-browser-dynamic", | ||
"@npm//@angular-devkit/architect-cli", | ||
"@npm//@angular-devkit/build-angular", | ||
"//projects/frontend-lib:build" |
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.
ooh, this is the dream, the missing dependency edge! ng serve
is sufficient workflow to get updates to libs
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.
Still facing an issue with the linker. The one we discussed yesterday. And the ci failure which I am unable to reproduce locally.
ng serve is sufficient workflow to get updates to libs
This depends if we will follow the Angular CLI or Nx model. Angular CLI uses pre-compiled libraries. NX uses ts path mappings. Both of them have pros and cons.
5d70941
to
cd8520d
Compare
235743a
to
8872179
Compare
This comment has been minimized.
This comment has been minimized.
Linker is working correctly and linking to the pkg_npm output directory. The trouble is that the :build architect() dep has an output directory of its own so it ends up at npm_package/build instead of at the root of the pkg_npm output dir. I will think about the principled solution to this kind of dep but for now the nested_packages attribute can be used as it assumes that the dep is a directory artifact and the package re-roots it:
|
Next error hit is a typescript error:
For reference: https://github.com/Microsoft/TypeScript/pull/9909/files & microsoft/TypeScript#9772 |
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
All looks good now with the pkg_npm fix and paths fixes except the
It sits at that point and never exits. The
|
81a0744
to
8d3637e
Compare
With this change we now build and consume an Angular library in the Angular application.
8d3637e
to
45dc696
Compare
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.
LGTM. Thanks @alan-agius4 !
With this change we now build and consume an Angular library
in the Angular application.