Add externs parameter to the polygerrit_plugin build rule definition
Bug: Issue 10653 Change-Id: Ibbc25b34f91b4f443915fd2e5d015ca55912c591
This commit is contained in:
@@ -425,7 +425,7 @@ def bundle_assets(*args, **kwargs):
|
|||||||
"""Combine html, js, css files and optionally split into js and html bundles."""
|
"""Combine html, js, css files and optionally split into js and html bundles."""
|
||||||
_bundle_rule(pkg = native.package_name(), *args, **kwargs)
|
_bundle_rule(pkg = native.package_name(), *args, **kwargs)
|
||||||
|
|
||||||
def polygerrit_plugin(name, app, srcs = [], deps = [], assets = None, plugin_name = None, **kwargs):
|
def polygerrit_plugin(name, app, srcs = [], deps = [], externs = [], assets = None, plugin_name = None, **kwargs):
|
||||||
"""Bundles plugin dependencies for deployment.
|
"""Bundles plugin dependencies for deployment.
|
||||||
|
|
||||||
This rule bundles all Polymer elements and JS dependencies into .html and .js files.
|
This rule bundles all Polymer elements and JS dependencies into .html and .js files.
|
||||||
@@ -435,6 +435,7 @@ def polygerrit_plugin(name, app, srcs = [], deps = [], assets = None, plugin_nam
|
|||||||
Args:
|
Args:
|
||||||
name: String, rule name.
|
name: String, rule name.
|
||||||
app: String, the main or root source file.
|
app: String, the main or root source file.
|
||||||
|
externs: Fileset, external definitions that should not be bundled.
|
||||||
assets: Fileset, additional files to be used by plugin in runtime, exported to "plugins/${name}/static".
|
assets: Fileset, additional files to be used by plugin in runtime, exported to "plugins/${name}/static".
|
||||||
plugin_name: String, plugin name. ${name} is used if not provided.
|
plugin_name: String, plugin name. ${name} is used if not provided.
|
||||||
"""
|
"""
|
||||||
@@ -460,7 +461,7 @@ def polygerrit_plugin(name, app, srcs = [], deps = [], assets = None, plugin_nam
|
|||||||
|
|
||||||
closure_js_library(
|
closure_js_library(
|
||||||
name = name + "_closure_lib",
|
name = name + "_closure_lib",
|
||||||
srcs = js_srcs,
|
srcs = js_srcs + externs,
|
||||||
convention = "GOOGLE",
|
convention = "GOOGLE",
|
||||||
no_closure_library = True,
|
no_closure_library = True,
|
||||||
deps = [
|
deps = [
|
||||||
|
Reference in New Issue
Block a user