-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
This changeset introduces support to the JS SDK build tools for Bazel-powered development. Each module has been hooked up to the `rules_closure` toolchain and made available for external builds to access (in addition to an optimized `sdk.js` and `sdk-debug.js` pair of output targets). Changes so far: - [x] Add `BUILD` config files for each module - [x] Add central `BUILD` file with meta-targets - [x] Working debug and release targets - [x] Support for services
closure_js_library( | ||
name = "sources", | ||
exports = [ | ||
"//src/base:base", |
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.
sources
target binds to all sources
name = "full", | ||
exports = [ | ||
":sources", | ||
"//entrypoint:sdk-full"]) |
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.
full
target additionally includes the entrypoint full.js
|
||
## Target: Debug | ||
closure_js_binary( | ||
name = "sdk-debug", |
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.
sdk-debug
is a debug/logging-enabled compiled JS target
|
||
## Target: Optimized | ||
closure_js_binary( | ||
name = "sdk", |
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.
sdk
is a production/optimized compiled JS target
convention = "GOOGLE", | ||
deps = [], | ||
exports = [], | ||
suppress = []): |
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.
all build rules move through here, which is nice, because we can apply stuff tree-wide
@@ -217,6 +222,8 @@ goog.scope(function() { | |||
* are items with the "FEATURED" flag present in their product flags, as | |||
* indicated by staff or external systems via the Bloombox Dashboard. | |||
* | |||
* @export | |||
* @override |
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.
lots of adds of @override
because it caught me not using them
goog.require('grpc.web.StatusCode'); | ||
goog.require('jspb.Message'); |
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.
removal of unused dependencies.
@@ -144,6 +132,7 @@ bloombox.rpc.ScopedOptions = (class ScopedOptions { | |||
* Partnership scope to use as an override for this RPC, if applicable. | |||
* Defaults to null if left unset. | |||
* | |||
* @const | |||
* @protected |
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.
it noticed that lots of properties can be labeled @const
, which i did not know.
"//src/shop/v1:shop-v1"]) | ||
|
||
closure_js_library( | ||
name = "shop-api", |
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.
otherwise it was a lot of b.s. files like this
Codecov Report
@@ Coverage Diff @@
## release/v2.1 #259 +/- ##
================================================
- Coverage 86.87% 86.25% -0.62%
================================================
Files 35 33 -2
Lines 1409 1339 -70
Branches 220 219 -1
================================================
- Hits 1224 1155 -69
+ Misses 185 184 -1
Continue to review full report at Codecov.
|
This changeset introduces support to the JS SDK build tools for Bazel-powered development. Each module has been hooked up to the
rules_closure
toolchain and made available for external builds to access (in addition to an optimizedsdk.js
andsdk-debug.js
pair of output targets).Changes so far:
BUILD
config files for each moduleBUILD
file with meta-targets