Simple development server
Bazel

Simple development server


ts_devserver_macro

ts_devserver_macro(tags, **kwargs)

ibazel wrapper for ts_devserver

This macro re-exposes the ts_devserver rule with some extra tags so that it behaves correctly under ibazel.

This is re-exported in //:defs.bzl as ts_devserver so if you load the rule from there, you actually get this macro.

Attributes

tags

List of strings; Optional

standard Bazel tags, this macro adds a couple for ibazel

**kwargs

Unknown; Optional

passed through to ts_devserver


ts_devserver

ts_devserver(name, deps, data, additional_root_paths, bootstrap, entry_module, port, scripts, serving_path, static_files)

ts_devserver is a simple development server intended for a quick "getting started" experience.

Additional documentation at https://github.com/alexeagle/angular-bazel-example/wiki/Running-a-devserver-under-Bazel

Attributes

name

Name; Required

A unique name for this rule.

deps

List of labels; Optional; Default is []

Targets that produce JavaScript, such as ts_library

data

List of labels; Optional; Default is []

Dependencies that can be require'd while the server is running

additional_root_paths

List of strings; Optional; Default is []

Additional root paths to serve staticfiles from. Paths should include the workspace name such as ["_main/resources"]

bootstrap

List of labels; Optional; Default is []

Scripts to include in the JS bundle before the module loader (require.js)

entry_module

String; Optional; Default is ''

The entrymodule should be the AMD module name of the entry module such as `"_main/src/index"ts_devserver concats the following snippet after the bundle to load the application:require(["entry_module"]);`

port

Integer; Optional; Default is 5432

The port that the devserver will listen on.

scripts

List of labels; Optional; Default is []

User scripts to include in the JS bundle before the application sources

serving_path

String; Optional; Default is ''

The path you can request from the client HTML which serves the JavaScript bundle. If you don't specify one, the JavaScript can be loaded at /_/ts_scripts.js

static_files

List of labels; Optional; Default is []

Arbitrary files which to be served, such as index.html. They are served relative to the package where this rule is declared.