--
Change 1 of 19 by Filipe Silva <filipematossilva@gmail.com>:
Use native.sh_binary for cross-platform ts_devserver
--
Change 2 of 19 by Filipe Silva <filipematossilva@gmail.com>:
Use runfiles resolution in ts_devserver
--
Change 3 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Resolve all devserver files using runfiles manifest
--
Change 4 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Support index.html files in subdirectories on windows
--
Change 5 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Properly handle directories for symlinked runfiles in devserver
--
Change 6 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Update gazelle and properly resolve Go runfile library
--
Change 7 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Add workaround for specifying serving_path on windows.
--
Change 8 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Do not resolve entry_module as runfile
* As with https://github.com/bazelbuild/rules_typescript/pull/327/commits/b739d771fb6c71f0d2b4c25e04a1aabb6808c27d, the `entry_module` is resolved through `rlocation`. This is wrong because the entry_module is not a real runfile.
--
Change 9 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Support serving runfiles through absolute manifest path
--
Change 10 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
fixup! Resolve all devserver files using runfiles manifest
Address feedback
--
Change 11 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
fixup! Resolve all devserver files using runfiles manifest
Update rules_go version to avoid incompatible protobuf version
--
Change 12 of 19 by Minko Gechev <mgechev@google.com>:
Fixes for golint and refactoring for g3
--
Change 13 of 19 by Minko Gechev <mgechev@google.com>:
Refactor Runfile invocation and fix golint errors
--
Change 14 of 19 by Minko Gechev <mgechev@google.com>:
Refactor Runfile invocation and fix golint errors
--
Change 15 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
fixup! Refactor Runfile invocation and fix golint errors
Fix accidentally revert
--
Change 16 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
fixup! Refactor Runfile invocation and fix golint errors
Fix wrong package name
--
Change 17 of 19 by Minko Gechev <mgechev@google.com>:
Update method name
--
Change 18 of 19 by Minko Gechev <mgechev@google.com>:
Do not depend on external rules_go package
--
Change 19 of 19 by Paul Gschwendtner <paulgschwendtner@gmail.com>:
Add logic to resolve runfiles within G3 without using external runfile helpers
Closes #327
PiperOrigin-RevId: 229863281
diff --git a/examples/devserver/BUILD.bazel b/examples/devserver/BUILD.bazel
new file mode 100644
index 0000000..f29149e
--- /dev/null
+++ b/examples/devserver/BUILD.bazel
@@ -0,0 +1,43 @@
+load("//:defs.bzl", "ts_devserver", "ts_library")
+
+ts_library(
+ name = "app",
+ srcs = ["app.ts"],
+ tsconfig = "//examples:tsconfig.json",
+ deps = [
+ "@npm//@types/node",
+ ],
+)
+
+ts_devserver(
+ name = "devserver",
+ additional_root_paths = [
+ "npm/node_modules/tslib",
+ "build_bazel_rules_typescript/examples/devserver/",
+ ],
+ port = 80,
+ serving_path = "/bundle.js",
+ static_files = [
+ # Files you want to import from the "additional_root_paths", still need to be explicitly specified
+ # as files that should be served. The root paths just make it more convenient to import those dependencies.
+ "@npm//tslib",
+ ":say-hello",
+ ":print-host",
+ ":index.html",
+ ],
+ # Dependencies that produce JavaScript output will be automatically picked up by ConcatJS and will be
+ # part of the serving_path bundle.
+ deps = [":app"],
+)
+
+genrule(
+ name = "say-hello",
+ outs = ["say-hello.js"],
+ cmd = "echo 'console.log(\"Hello!\")' > $@",
+)
+
+genrule(
+ name = "print-host",
+ outs = ["test/print-host.js"],
+ cmd = "echo 'console.log(location.host)' > $@",
+)