Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Update docs for release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 25, 2018
1 parent 10ff84f commit 3f1d24b
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 24 deletions.
85 changes: 78 additions & 7 deletions docs/api/build_defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down Expand Up @@ -196,7 +196,7 @@ <h3 id="ts_library_macro_args">Attributes</h3>

<h2 id="ts_library">ts_library</h2>

<pre>ts_library(<a href="#ts_library.name">name</a>, <a href="#ts_library.srcs">srcs</a>, <a href="#ts_library.compiler">compiler</a>, <a href="#ts_library.internal_testing_type_check_dependencies">internal_testing_type_check_dependencies</a>, <a href="#ts_library.node_modules">node_modules</a>, <a href="#ts_library.supports_workers">supports_workers</a>, <a href="#ts_library.tsconfig">tsconfig</a>, <a href="#ts_library.tsickle_typed">tsickle_typed</a>)</pre>
<pre>ts_library(<a href="#ts_library.name">name</a>, <a href="#ts_library.deps">deps</a>, <a href="#ts_library.srcs">srcs</a>, <a href="#ts_library.compiler">compiler</a>, <a href="#ts_library.internal_testing_type_check_dependencies">internal_testing_type_check_dependencies</a>, <a href="#ts_library.node_modules">node_modules</a>, <a href="#ts_library.supports_workers">supports_workers</a>, <a href="#ts_library.tsconfig">tsconfig</a>, <a href="#ts_library.tsickle_typed">tsickle_typed</a>)</pre>

<p><code>ts_library</code> type-checks and compiles a set of TypeScript sources to JavaScript.</p>
<p>It produces declarations files (<code>.d.ts</code>) which are used for compiling downstream
Expand All @@ -218,6 +218,13 @@ <h3 id="ts_library_args">Attributes</h3>
<p>A unique name for this rule.</p>
</td>
</tr>
<tr id="ts_library.deps">
<td><code>deps</code></td>
<td>
<p><code>List of <a href="https://bazel.build/docs/build-ref.html#labels">labels</a>; Optional; Default is []</code></p>

</td>
</tr>
<tr id="ts_library.srcs">
<td><code>srcs</code></td>
<td>
Expand All @@ -228,11 +235,17 @@ <h3 id="ts_library_args">Attributes</h3>
<tr id="ts_library.compiler">
<td><code>compiler</code></td>
<td>
<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Optional; Default is //internal:tsc_wrapped_bin</code></p>
<p>Intended for internal use only.
Sets a different TypeScript compiler binary to use for this library.
<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Optional; Default is @build_bazel_rules_typescript//:@bazel/typescript/tsc_wrapped</code></p>
<p>Sets a different TypeScript compiler binary to use for this library.
For example, we use the vanilla TypeScript tsc.js for bootstrapping,
and Angular compilations can replace this with <code>ngc</code>.</p>
<pre><code> The default ts_library compiler depends on the `@npm//:@bazel/typescript`
target which is setup for projects that use bazel managed npm deps that
fetch the @bazel/typescript npm package. It is recommended that you use
the workspace name `@npm` for bazel managed deps so the default
compiler works out of the box. Otherwise, you'll have to override
the compiler attribute manually.
</code></pre>
</td>
</tr>
<tr id="ts_library.internal_testing_type_check_dependencies">
Expand All @@ -245,8 +258,66 @@ <h3 id="ts_library_args">Attributes</h3>
<tr id="ts_library.node_modules">
<td><code>node_modules</code></td>
<td>
<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Optional; Default is @//:node_modules</code></p>

<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Optional; Default is @npm//:typescript__typings</code></p>
<p>The npm packages which should be available during the compile.</p>
<pre><code> The default value is `@npm//:typescript__typings` is setup
for projects that use bazel managed npm deps that. It is recommended
that you use the workspace name `@npm` for bazel managed deps so the
default node_modules works out of the box. Otherwise, you'll have to
override the node_modules attribute manually. This default is in place
since ts_library will always depend on at least the typescript
default libs which are provided by `@npm//:typescript__typings`.

This attribute is DEPRECATED. As of version 0.18.0 the recommended
approach to npm dependencies is to use fine grained npm dependencies
which are setup with the `yarn_install` or `npm_install` rules.

For example, in targets that used a `//:node_modules` filegroup,

```
ts_library(
name = "my_lib",
...
node_modules = "//:node_modules",
)
```

which specifies all files within the `//:node_modules` filegroup
to be inputs to the `my_lib`. Using fine grained npm dependencies,
`my_lib` is defined with only the npm dependencies that are
needed:

```
ts_library(
name = "my_lib",
...
deps = [
"@npm//:@types/foo",
"@npm//:@types/bar",
"@npm//:foo",
"@npm//:bar",
...
],
)
```

In this case, only the listed npm packages and their
transitive deps are includes as inputs to the `my_lib` target
which reduces the time required to setup the runfiles for this
target (see https://github.com/bazelbuild/bazel/issues/5153).
The default typescript libs are also available via the node_modules
default in this case.

The @npm external repository and the fine grained npm package
targets are setup using the `yarn_install` or `npm_install` rule
in your WORKSPACE file:

yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
</code></pre>
</td>
</tr>
<tr id="ts_library.supports_workers">
Expand Down
2 changes: 1 addition & 1 deletion docs/api/devserver/ts_devserver.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down
6 changes: 3 additions & 3 deletions docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down Expand Up @@ -104,7 +104,7 @@ <h2>Rule sets</h2>
<li><a href="#ts_config">tsconfig.json files using extends</a></li>
<li><a href="#ts_repositories">Install toolchain dependencies</a></li>
<li><a href="#ts_devserver">Simple development server</a></li>
<li><a href="#ts_web_test">Unit testing in with Karma</a></li>
<li><a href="#ts_web_test">Unit testing with Karma</a></li>
<li><a href="#ts_proto_library">Protocol Buffers</a></li>
</ul>
</nav>
Expand Down Expand Up @@ -248,7 +248,7 @@ <h3>Macros</h3>
</tr>
</tbody>
</table>
<h2><a href="/api/karma/ts_web_test.html" id="ts_web_test">Unit testing in with Karma</a></h2>
<h2><a href="/api/karma/ts_web_test.html" id="ts_web_test">Unit testing with Karma</a></h2>

<h3>Rules</h3>
<table class="overview-table">
Expand Down
35 changes: 28 additions & 7 deletions docs/api/karma/ts_web_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>Unit testing in with Karma</title>
<title>Unit testing with Karma</title>

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Expand All @@ -23,7 +23,7 @@
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Unit testing in with Karma</span>
<span class="mdl-layout-title">Unit testing with Karma</span>
</div>
</header>
<div class="mdl-layout__drawer">
Expand Down Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand All @@ -94,7 +94,7 @@

<main class="mdl-layout__content">
<div class="page-content">
<h1>Unit testing in with Karma</h1>
<h1>Unit testing with Karma</h1>

<nav class="toc">
<h2>Rules</h2>
Expand All @@ -111,7 +111,7 @@ <h2>Macros</h2>

<h2 id="ts_web_test_macro">ts_web_test_macro</h2>

<pre>ts_web_test_macro(<a href="#ts_web_test_macro.tags">tags</a>, <a href="#ts_web_test_macro.data">data</a>)</pre>
<pre>ts_web_test_macro(<a href="#ts_web_test_macro.karma">karma</a>, <a href="#ts_web_test_macro.tags">tags</a>, <a href="#ts_web_test_macro.data">data</a>)</pre>

<p>ibazel wrapper for <code>ts_web_test</code></p>
<p>This macro re-exposes the <code>ts_web_test</code> rule with some extra tags so that
Expand All @@ -128,6 +128,13 @@ <h3 id="ts_web_test_macro_args">Attributes</h3>
<col class="col-description" />
</colgroup>
<tbody>
<tr id="ts_web_test_macro.karma">
<td><code>karma</code></td>
<td>
<p><code>Unknown; Optional</code></p>
<p>karma binary label</p>
</td>
</tr>
<tr id="ts_web_test_macro.tags">
<td><code>tags</code></td>
<td>
Expand All @@ -149,7 +156,7 @@ <h3 id="ts_web_test_macro_args">Attributes</h3>

<h2 id="ts_web_test_suite">ts_web_test_suite</h2>

<pre>ts_web_test_suite(<a href="#ts_web_test_suite.name">name</a>, <a href="#ts_web_test_suite.browsers">browsers</a>, <a href="#ts_web_test_suite.args">args</a>, <a href="#ts_web_test_suite.browser_overrides">browser_overrides</a>, <a href="#ts_web_test_suite.config">config</a>, <a href="#ts_web_test_suite.flaky">flaky</a>, <a href="#ts_web_test_suite.local">local</a>, <a href="#ts_web_test_suite.shard_count">shard_count</a>, <a href="#ts_web_test_suite.size">size</a>, <a href="#ts_web_test_suite.tags">tags</a>, <a href="#ts_web_test_suite.test_suite_tags">test_suite_tags</a>, <a href="#ts_web_test_suite.timeout">timeout</a>, <a href="#ts_web_test_suite.visibility">visibility</a>, <a href="#ts_web_test_suite.web_test_data">web_test_data</a>, <a href="#ts_web_test_suite.wrapped_test_tags">wrapped_test_tags</a>)</pre>
<pre>ts_web_test_suite(<a href="#ts_web_test_suite.name">name</a>, <a href="#ts_web_test_suite.browsers">browsers</a>, <a href="#ts_web_test_suite.karma">karma</a>, <a href="#ts_web_test_suite.args">args</a>, <a href="#ts_web_test_suite.browser_overrides">browser_overrides</a>, <a href="#ts_web_test_suite.config">config</a>, <a href="#ts_web_test_suite.flaky">flaky</a>, <a href="#ts_web_test_suite.local">local</a>, <a href="#ts_web_test_suite.shard_count">shard_count</a>, <a href="#ts_web_test_suite.size">size</a>, <a href="#ts_web_test_suite.tags">tags</a>, <a href="#ts_web_test_suite.test_suite_tags">test_suite_tags</a>, <a href="#ts_web_test_suite.timeout">timeout</a>, <a href="#ts_web_test_suite.visibility">visibility</a>, <a href="#ts_web_test_suite.web_test_data">web_test_data</a>, <a href="#ts_web_test_suite.wrapped_test_tags">wrapped_test_tags</a>)</pre>

<p>Defines a test_suite of web_test targets that wrap a ts_web_test target.</p>

Expand All @@ -176,6 +183,13 @@ <h3 id="ts_web_test_suite_args">Attributes</h3>
<p>A sequence of labels specifying the browsers to use.</p>
</td>
</tr>
<tr id="ts_web_test_suite.karma">
<td><code>karma</code></td>
<td>
<p><code>Unknown; Optional</code></p>
<p>karma binary label</p>
</td>
</tr>
<tr id="ts_web_test_suite.args">
<td><code>args</code></td>
<td>
Expand Down Expand Up @@ -280,7 +294,7 @@ <h3 id="ts_web_test_suite_args">Attributes</h3>

<h2 id="ts_web_test">ts_web_test</h2>

<pre>ts_web_test(<a href="#ts_web_test.name">name</a>, <a href="#ts_web_test.deps">deps</a>, <a href="#ts_web_test.data">data</a>, <a href="#ts_web_test.srcs">srcs</a>, <a href="#ts_web_test.bootstrap">bootstrap</a>, <a href="#ts_web_test.static_files">static_files</a>)</pre>
<pre>ts_web_test(<a href="#ts_web_test.name">name</a>, <a href="#ts_web_test.deps">deps</a>, <a href="#ts_web_test.data">data</a>, <a href="#ts_web_test.srcs">srcs</a>, <a href="#ts_web_test.bootstrap">bootstrap</a>, <a href="#ts_web_test.karma">karma</a>, <a href="#ts_web_test.static_files">static_files</a>)</pre>

<p>Runs unit tests in a browser.</p>
<p>When executed under <code>bazel test</code>, this uses a headless browser for speed.
Expand Down Expand Up @@ -343,6 +357,13 @@ <h3 id="ts_web_test_args">Attributes</h3>
or UMD bundles for third-party libraries.</p>
</td>
</tr>
<tr id="ts_web_test.karma">
<td><code>karma</code></td>
<td>
<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Optional; Default is @build_bazel_rules_typescript//:karma/karma</code></p>

</td>
</tr>
<tr id="ts_web_test.static_files">
<td><code>static_files</code></td>
<td>
Expand Down
4 changes: 1 addition & 3 deletions docs/api/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/api/protobufjs/ts_proto_library.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ts_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ts_repositories.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ul>
</li>
<li>
<a href="/api/karma/ts_web_test.html">Unit testing in with Karma</a>
<a href="/api/karma/ts_web_test.html">Unit testing with Karma</a>
<ul>
<li>
<a href="/api/karma/ts_web_test.html#ts_web_test">
Expand Down

0 comments on commit 3f1d24b

Please sign in to comment.