build: add secondary entry points for tokens#922
Conversation
c26a873 to
e8a819e
Compare
|
Ran into some issue with not being able to use out reexported |
e8a819e to
47ec44f
Compare
47ec44f to
78f18f5
Compare
|
Looks like CI is getting some very unhelpful error. |
02742be to
1f570dd
Compare
|
|
||
| import { FileLoader } from './file-loader'; | ||
| import { REQUEST, RESPONSE } from './tokens'; | ||
| // import { REQUEST, RESPONSE } from './tokens/index'; |
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
| load( | ||
| "//tools:defaults.bzl", | ||
| "ts_library", | ||
| # "ng_module", |
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
| import { Request, Response } from 'hapi'; | ||
|
|
|
Hello, I see that this is marked as a breaking change and milestoned for 6.0. However after "upgrading" to I don't think you should force us to wait for Just my 2 cents, and thank you for your good work on this project! |
|
@axnsan12 sorry about the confusion, this is definitely going into 5.x, notice the PR Target 5.x & master. |
|
Just a small update here. |
c7e5bc1 to
334443f
Compare
|
This is almost ready to go, just 1 small issue which is possibly due to the generated code is: Looking for sign off from @alexeagle disabling this test for now |
882b3a0 to
c09f185
Compare
4f427ab to
47daaa7
Compare
| exports_files(["tsconfig.json"]) | ||
|
|
||
| # Provides the npm-installed dependencies to Bazel actions. | ||
| filegroup( |
There was a problem hiding this comment.
there is now an (undocumented) node_modules_filegroup that you should probably use instead, just for readability: https://github.com/bazelbuild/rules_nodejs/blob/master/defs.bzl#L41
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "name": "@nguniversal/hapi-engine/tokens" | |||
There was a problem hiding this comment.
hmm, you shouldn't need to add extra package.json files - ng_package should generate these for secondary entry points as needed
64ac52f to
0948ce1
Compare
0948ce1 to
8d7beef
Compare
| def ts_test_library(node_modules=None, **kwargs): | ||
| ts_library(testonly=1, **kwargs) | ||
|
|
||
| def ts_library(tsconfig = None, node_modules = None, **kwargs): |
There was a problem hiding this comment.
Why are ts_library, ng_module and ng_package redefined here? I would rather prefer us specifying this everywhere by hand,
Inside Google we have learnt never to use macros except for final leaf targets and when completely unavoidable.
There was a problem hiding this comment.
While I agree it's not the best idea, it's so we don't have to redefine those variables and can keep them organised in one place since there is no alternative right now.
This is the same as Angular core https://github.com/angular/angular/blob/master/tools/defaults.bzl
Once we have a better way of specifying defaults then we wont need this.
There was a problem hiding this comment.
Alright - Spoke with Alex and this is a temporary work around needed. Let's add a TODO comment that this should be revisited at some point.
| "@nguniversal/hapi-engine/tokens": "nguniversal.hapiEngine.tokens", | ||
| "rxjs": "Rx", | ||
| "rxjs/operators": "Rx.operators" | ||
| "rxjs/operators": "Rx.operators", |
There was a problem hiding this comment.
I don't completely understand what the GLOBALS is doing. But I'm scared seeing the symbol Rx here. Rx.ts in rxjs pulls in the entire library. Are we sure that's not happening here?
There was a problem hiding this comment.
This is ensuring that the entire lib is not being pulled into the umd bundle. The symbol on the right is what it will be named on the global object when passed in.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
upgrades angular to v6-rc.1
uses bazel to do secondary entrypoints for tokens