blob: a4548675d8ded5d684efafe09e0759e6aee264dc [file] [log] [blame]
<!--
Documentation generated by Skydoc
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Multiple tsconfig.json files</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">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.green-light_blue.min.css">
<script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
<link rel="stylesheet" href="/rules_typescript/api/main.css">
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Multiple tsconfig.json files</span>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Bazel</span>
<nav class="drawer-nav">
<ul class="drawer-nav">
<li><a href="/rules_typescript/api/index.html">Overview</a></li>
<li>
<a href="/rules_typescript/api/build_defs.html">TypeScript compilation</a>
<ul>
<li>
<a href="/rules_typescript/api/build_defs.html#ts_library">
ts_library
</a>
</li>
</ul>
</li>
<li>
<a href="/rules_typescript/api/ts_repositories.html">Install toolchain dependencies</a>
<ul>
</ul>
</li>
<li>
<a href="/rules_typescript/api/ts_config.html">Multiple tsconfig.json files</a>
<ul>
<li>
<a href="/rules_typescript/api/ts_config.html#ts_config">
ts_config
</a>
</li>
</ul>
</li>
<li>
<a href="/rules_typescript/api/devserver/ts_devserver.html">Simple development server</a>
<ul>
<li>
<a href="/rules_typescript/api/devserver/ts_devserver.html#ts_devserver">
ts_devserver
</a>
</li>
</ul>
</li>
<li>
<a href="/rules_typescript/api/karma/ts_web_test.html">Unit testing in Chrome</a>
<ul>
<li>
<a href="/rules_typescript/api/karma/ts_web_test.html#ts_web_test">
ts_web_test
</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
<h1>Multiple tsconfig.json files</h1>
<nav class="toc">
<h2>Rules</h2>
<ul>
<li><a href="#ts_config">ts_config</a></li>
</ul>
</nav>
<hr>
<h2 id="ts_config">ts_config</h2>
<pre>ts_config(<a href="#ts_config.name">name</a>, <a href="#ts_config.deps">deps</a>, <a href="#ts_config.src">src</a>)</pre>
<p>Allows a tsconfig.json file to extend another file.</p>
<p>Normally, you just give a single <code>tsconfig.json</code> file as the tsconfig attribute
of a <code>ts_library</code> rule. However, if your <code>tsconfig.json</code> uses the <code>extends</code>
feature from TypeScript, then the Bazel implementation needs to know about that
extended configuration file as well, to pass them both to the TypeScript compiler.</p>
<h3 id="ts_config_args">Attributes</h3>
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="ts_config.name">
<td><code>name</code></td>
<td>
<p><code><a href="https://bazel.build/docs/build-ref.html#name">Name</a>; Required</code></p>
<p>A unique name for this rule.</p>
</td>
</tr>
<tr id="ts_config.deps">
<td><code>deps</code></td>
<td>
<p><code>List of <a href="https://bazel.build/docs/build-ref.html#labels">labels</a>; Required</code></p>
<p>Additional tsconfig.json files referenced via extends</p>
</td>
</tr>
<tr id="ts_config.src">
<td><code>src</code></td>
<td>
<p><code><a href="https://bazel.build/docs/build-ref.html#labels">Label</a>; Required</code></p>
<p>The tsconfig.json file passed to the TypeScript compiler</p>
</td>
</tr>
</tbody>
</table>
</div>
<footer class="mdl-mini-footer">
<div class="mdl-mini-footer__left-section">
<div class="mdl-logo">Bazel</div>
<ul class="mdl-mini-footer__link-list">
<li><a href="https://bazel.build">Home</a></li>
<li><a href="https://github.com/bazelbuild">GitHub</a></li>
</ul>
</div>
</footer>
</main>
</div>
</body>
</html>