Closure Rules v0.3.0
This release makes it possible to render type safe Protocol Buffers inside HTML templates. You can now write services the same way Googlers do, with Protocol Buffers at all layers of the stack.
Protocol Buffers are the most integral data structure at Google. BigTable stores protobufs. gRPC transmits protobufs over network between backends and frontends. Business logic operates on protobufs. HTML templates render protobufs. This eliminates entire categories of problems most developers would consider toil, such as turning SQL into objects into JSON/XML and back into objects.
This release also enables CSS sourcemaps and upgrades Closure to the latest version.
New Features
- Protobuf types can be referenced in HTML templates by having closure_js_template_library depend on a closure_js_proto_library rule. Support has not yet been added for closure_java_template_library yet. This work was made possible by @mikesamuel who put a lot of work into open sourcing this functionality. The integration was contributed by @hochhaus in 1cae287 which includes tested examples of usage.
- closure_css_binary now generates a CSS sourcemap file thanks again to @mikesamuel and Closure Stylesheets maintainer @iflan. Integration in a2fed40. Improvements still need to be made on paths outputted in sourcemap file.
- Automatically enable
--assume_function_wrapper
optimization whenoutput_wrapper = "(function(){%output%}).call(this);"
. Contributed by @hochhaus in 190f7d9
Bug Fixes
- Allow filesets in closure_js_proto_library. Contributed by @flamingcow66 in bd4049c
Breaking Changes
- New Type Inference engine is now disabled by default. To re-enable it, pass
defs=["--new_type_inf"]
to closure_js_binary. See also fedf10c. - The deprecated
closure_js_template_library
andclosure_java_template_library
aliases have been removed. - The
//closure/stylesheets
binary has been moved to//third_party/java/csscomp:ClosureCommandLineCompiler
.
Upgrades
- Closure Compiler v20160713 → v20160822 (release notes)
- Includes fixes making it easy to use goog.module w/ ES6 subclasses
- Closure Library v20160713 → v20160822 (release notes)
- Includes breaking improvements to
goog.dom.TagName
- Includes breaking improvements to
- Closure Stylesheets 20160212 → 1.3.0 (release notes)
- Sourcemap functionality fixed
@if
now usable inside blocks, including@mixin
- Closure Templates 2016-07-21 → 2016-07-25
- Incremental DOM 0.4.0 → 0.5.0
- Safe HTML Types 1.0.4 → 1.0.5