Created
January 22, 2017 02:36
-
-
Save jschaf/68f7ec8308a4a493cf3b66335bd3524a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package(default_visibility = ["//visibility:public"]) | |
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary") | |
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") | |
# With the externs file as a source for the library | |
closure_js_library( | |
name = "foo", | |
srcs = [ | |
"foo.js", | |
], | |
) | |
closure_js_binary( | |
name = "foo_bin", | |
defs = [ | |
], | |
entry_points = ["foo"], | |
deps = [ | |
"//:foo", | |
], | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @externs | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goog.module('foo'); | |
function parseComment0() { | |
try { | |
throw new Error; | |
} catch (ex) { | |
return ex.message; | |
} | |
} | |
function parseComment1() { | |
try { | |
throw new Error; | |
} catch (ex) { | |
if (ex instanceof Error) return ex.message; | |
} | |
} | |
function parseComment2() { | |
try { | |
throw new Error; | |
} catch (ex) { | |
return /** @type {!Error} */ (ex).message; | |
} | |
} | |
function parseComment3() { | |
try { | |
throw new Error; | |
} catch (ex) { | |
const error = /** @type {!Error} */ (ex); | |
return error.message; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http_archive( | |
name = "io_bazel_rules_closure", | |
sha256 = "c104d30b4aaf23d72afe327b4478d1c08cf1ff75c6db2060682bb7ad0591e19b", | |
strip_prefix = "rules_closure-962d929bc769fc320dd395f54fef3e9db62c3920", | |
urls = [ | |
"http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/962d929bc769fc320dd395f54fef3e9db62c3920.tar.gz", # 2016-12-28 | |
"https://github.com/bazelbuild/rules_closure/archive/962d929bc769fc320dd395f54fef3e9db62c3920.tar.gz", | |
], | |
) | |
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") | |
closure_repositories() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment