{"componentChunkName":"component---src-templates-handbook-tsx","path":"/docs/handbook/integrating-with-build-tools.html","result":{"data":{"allSitePage":{"nodes":[{"path":"/dev-404-page/"},{"path":"/docs/handbook/advanced-types.html"},{"path":"/docs/handbook/basic-types.html"},{"path":"/docs/handbook/classes.html"},{"path":"/docs/handbook/compiler-options-in-msbuild.html"},{"path":"/docs/handbook/compiler-options.html"},{"path":"/docs/handbook/configuring-watch.html"},{"path":"/docs/handbook/declaration-merging.html"},{"path":"/docs/handbook/decorators.html"},{"path":"/docs/handbook/enums.html"},{"path":"/docs/handbook/functions.html"},{"path":"/docs/handbook/generics.html"},{"path":"/docs/handbook/integrating-with-build-tools.html"},{"path":"/docs/handbook/interfaces.html"},{"path":"/docs/handbook/iterators-and-generators.html"},{"path":"/docs/handbook/jsdoc-supported-types.html"},{"path":"/docs/handbook/jsx.html"},{"path":"/docs/handbook/literal-types.html"},{"path":"/docs/handbook/mixins.html"},{"path":"/docs/handbook/module-resolution.html"},{"path":"/docs/handbook/modules.html"},{"path":"/docs/handbook/namespaces-and-modules.html"},{"path":"/docs/handbook/namespaces.html"},{"path":"/docs/handbook/nightly-builds.html"},{"path":"/docs/handbook/project-references.html"},{"path":"/docs/handbook/symbols.html"},{"path":"/docs/handbook/"},{"path":"/docs/handbook/triple-slash-directives.html"},{"path":"/docs/handbook/type-checking-javascript-files.html"},{"path":"/docs/handbook/type-compatibility.html"},{"path":"/docs/handbook/type-inference.html"},{"path":"/docs/handbook/unions-and-intersections.html"},{"path":"/docs/handbook/utility-types.html"},{"path":"/docs/handbook/variable-declarations.html"},{"path":"/docs/handbook/writing-declaration-files.html"},{"path":"/docs/handbook/declaration-files/by-example.html"},{"path":"/docs/handbook/declaration-files/consumption.html"},{"path":"/docs/handbook/declaration-files/deep-dive.html"},{"path":"/docs/handbook/declaration-files/do-s-and-don-ts.html"},{"path":"/docs/handbook/declaration-files/introduction.html"},{"path":"/docs/handbook/declaration-files/library-structures.html"},{"path":"/docs/handbook/declaration-files/publishing.html"},{"path":"/docs/handbook/declaration-files/templates.html"},{"path":"/docs/handbook/release-notes/typescript-1-1.html"},{"path":"/docs/handbook/release-notes/typescript-1-3.html"},{"path":"/docs/handbook/release-notes/typescript-1-4.html"},{"path":"/docs/handbook/release-notes/typescript-1-5.html"},{"path":"/docs/handbook/release-notes/typescript-1-6.html"},{"path":"/docs/handbook/release-notes/typescript-1-7.html"},{"path":"/docs/handbook/release-notes/typescript-1-8.html"},{"path":"/docs/handbook/release-notes/typescript-2-0.html"},{"path":"/docs/handbook/release-notes/typescript-2-2.html"},{"path":"/docs/handbook/release-notes/typescript-2-1.html"},{"path":"/docs/handbook/release-notes/typescript-2-3.html"},{"path":"/docs/handbook/release-notes/typescript-2-4.html"},{"path":"/docs/handbook/release-notes/typescript-2-5.html"},{"path":"/docs/handbook/release-notes/typescript-2-6.html"},{"path":"/docs/handbook/release-notes/typescript-2-7.html"},{"path":"/docs/handbook/release-notes/typescript-2-8.html"},{"path":"/docs/handbook/release-notes/typescript-2-9.html"},{"path":"/docs/handbook/release-notes/typescript-3-0.html"},{"path":"/docs/handbook/release-notes/typescript-3-1.html"},{"path":"/docs/handbook/release-notes/typescript-3-2.html"},{"path":"/docs/handbook/release-notes/typescript-3-3.html"},{"path":"/docs/handbook/release-notes/typescript-3-4.html"},{"path":"/docs/handbook/release-notes/typescript-3-5.html"},{"path":"/docs/handbook/release-notes/typescript-3-6.html"},{"path":"/docs/handbook/release-notes/typescript-3-7.html"},{"path":"/docs/handbook/release-notes/typescript-3-8.html"},{"path":"/docs/handbook/asp-net-core.html"},{"path":"/docs/handbook/angular.html"},{"path":"/docs/handbook/dom-manipulation.html"},{"path":"/docs/handbook/gulp.html"},{"path":"/docs/handbook/migrating-from-javascript.html"},{"path":"/docs/handbook/react-&-webpack.html"},{"path":"/docs/handbook/react.html"},{"path":"/docs/handbook/typescript-in-5-minutes-func.html"},{"path":"/docs/handbook/typescript-in-5-minutes.html"},{"path":"/docs/handbook/typescript-in-5-minutes-oop.html"},{"path":"/docs/handbook/typescript-from-scratch.html"},{"path":"/docs/handbook/typescript-tooling-in-5-minutes.html"},{"path":"/docs/handbook/tsconfig-json.html"},{"path":"/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/global-plugin-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/global-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-class-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-function-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-plugin-d-ts.html"},{"path":"/docs/handbook/declaration-files/templates/module-d-ts.html"},{"path":"/docs/handbook/release-notes/overview.html"},{"path":"/tsconfig"},{"path":"/en/tsconfig"},{"path":"/ja/tsconfig"},{"path":"/vo/tsconfig"},{"path":"/play"},{"path":"/en/play"},{"path":"/es/play"},{"path":"/vo/play"},{"path":"/zh/play"},{"path":"/ja/play"},{"path":"/play/3-7/fixits/big-number-literals.ts"},{"path":"/play/3-7/fixits/const-to-let.ts"},{"path":"/play/3-7/fixits/infer-from-usage-changes.ts"},{"path":"/play/3-7/syntax-and-messaging/flattened-error-reporting.ts"},{"path":"/play/3-7/syntax-and-messaging/nullish-coalescing.ts"},{"path":"/play/3-7/syntax-and-messaging/optional-chaining.ts"},{"path":"/play/3-7/types-and-code-flow/assertion-functions.ts"},{"path":"/play/3-7/types-and-code-flow/recursive-type-references.ts"},{"path":"/play/3-7/types-and-code-flow/uncalled-function-checks.ts"},{"path":"/play/3-8/breaking-changes/checking-unions-with-index-signatures.ts"},{"path":"/play/3-8/jsdoc-improvements/accessibility-modifiers.js"},{"path":"/play/3-8/syntax-and-messaging/export-modules-from.ts"},{"path":"/play/3-8/syntax-and-messaging/private-class-fields.ts"},{"path":"/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/play/javascript/external-apis/typescript-with-node.js"},{"path":"/play/javascript/external-apis/typescript-with-web.js"},{"path":"/play/javascript/external-apis/typescript-with-webgl.js"},{"path":"/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/play/javascript/functions-with-javascript/typing-functions.ts"},{"path":"/play/javascript/helping-with-javascript/errors.ts"},{"path":"/play/javascript/helping-with-javascript/quick-fixes.ts"},{"path":"/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/play/javascript/javascript-essentials/functions.ts"},{"path":"/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/play/javascript/modern-javascript/async-await.ts"},{"path":"/play/javascript/modern-javascript/immutability.ts"},{"path":"/play/javascript/modern-javascript/import-export.ts"},{"path":"/play/javascript/modern-javascript/jsdoc-support.js"},{"path":"/play/javascript/working-with-classes/classes-101.ts"},{"path":"/play/javascript/working-with-classes/generic-classes.ts"},{"path":"/play/javascript/working-with-classes/mixins.ts"},{"path":"/play/javascript/working-with-classes/this.ts"},{"path":"/play/playground/config/javascript-playgrounds.js"},{"path":"/play/playground/config/new-compiler-defaults.ts"},{"path":"/play/playground/language/automatic-type-acquisition.ts"},{"path":"/play/playground/language/fixits.ts"},{"path":"/play/playground/tooling/mobile-support.ts"},{"path":"/play/playground/tooling/sharable-urls.ts"},{"path":"/play/playground/tooling/typescript-versions.ts"},{"path":"/play/typescript/language/soundness.ts"},{"path":"/play/typescript/language/structural-typing.ts"},{"path":"/play/typescript/language/type-guards.ts"},{"path":"/play/typescript/language/type-widening-and-narrowing.ts"},{"path":"/play/typescript/language-extensions/enums.ts"},{"path":"/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/play/typescript/meta-types/conditional-types.ts"},{"path":"/play/typescript/meta-types/discriminate-types.ts"},{"path":"/play/typescript/meta-types/indexed-types.ts"},{"path":"/play/typescript/meta-types/mapped-types.ts"},{"path":"/play/typescript/primitives/any.ts"},{"path":"/play/typescript/primitives/literals.ts"},{"path":"/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/play/typescript/primitives/unknown-and-never.ts"},{"path":"/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/play/typescript/type-primitives/nullable-types.ts"},{"path":"/play/typescript/type-primitives/tuples.ts"},{"path":"/es/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/es/play/javascript/external-apis/typescript-with-node.js"},{"path":"/es/play/javascript/external-apis/typescript-with-web.js"},{"path":"/es/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/es/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/es/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/es/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/es/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/es/play/typescript/type-primitives/nullable-types.ts"},{"path":"/es/play/typescript/type-primitives/tuples.ts"},{"path":"/ja/play/typescript/language-extensions/enums.ts"},{"path":"/ja/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/ja/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/ja/play/typescript/primitives/any.ts"},{"path":"/ja/play/typescript/primitives/literals.ts"},{"path":"/ja/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/ja/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/vo/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/vo/play/javascript/javascript-essentials/functions.ts"},{"path":"/vo/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/vo/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/zh/play/javascript/external-apis/typescript-with-deno.ts"},{"path":"/zh/play/javascript/external-apis/typescript-with-node.js"},{"path":"/zh/play/javascript/external-apis/typescript-with-web.js"},{"path":"/zh/play/javascript/external-apis/typescript-with-webgl.js"},{"path":"/zh/play/javascript/functions-with-javascript/function-chaining.ts"},{"path":"/zh/play/javascript/functions-with-javascript/generic-functions.ts"},{"path":"/zh/play/javascript/functions-with-javascript/typing-functions.ts"},{"path":"/zh/play/javascript/helping-with-javascript/errors.ts"},{"path":"/zh/play/javascript/helping-with-javascript/quick-fixes.ts"},{"path":"/zh/play/javascript/javascript-essentials/code-flow.ts"},{"path":"/zh/play/javascript/javascript-essentials/functions.ts"},{"path":"/zh/play/javascript/javascript-essentials/hello-world.ts"},{"path":"/zh/play/javascript/modern-javascript/import-export.ts"},{"path":"/zh/play/javascript/modern-javascript/jsdoc-support.js"},{"path":"/zh/play/javascript/working-with-classes/classes-101.ts"},{"path":"/zh/play/javascript/working-with-classes/generic-classes.ts"},{"path":"/zh/play/javascript/working-with-classes/mixins.ts"},{"path":"/zh/play/javascript/working-with-classes/this.ts"},{"path":"/zh/play/playground/config/javascript-playgrounds.js"},{"path":"/zh/play/playground/config/new-compiler-defaults.ts"},{"path":"/zh/play/playground/language/automatic-type-acquisition.ts"},{"path":"/zh/play/playground/language/fixits.ts"},{"path":"/zh/play/playground/tooling/mobile-support.ts"},{"path":"/zh/play/playground/tooling/sharable-urls.ts"},{"path":"/zh/play/playground/tooling/typescript-versions.ts"},{"path":"/zh/play/typescript/language/soundness.ts"},{"path":"/zh/play/typescript/language/structural-typing.ts"},{"path":"/zh/play/typescript/language/type-guards.ts"},{"path":"/zh/play/typescript/language/type-widening-and-narrowing.ts"},{"path":"/zh/play/typescript/language-extensions/enums.ts"},{"path":"/zh/play/typescript/language-extensions/nominal-typing.ts"},{"path":"/zh/play/typescript/language-extensions/types-vs-interfaces.ts"},{"path":"/zh/play/typescript/meta-types/conditional-types.ts"},{"path":"/zh/play/typescript/meta-types/discriminate-types.ts"},{"path":"/zh/play/typescript/meta-types/indexed-types.ts"},{"path":"/zh/play/typescript/meta-types/mapped-types.ts"},{"path":"/zh/play/typescript/primitives/any.ts"},{"path":"/zh/play/typescript/primitives/literals.ts"},{"path":"/zh/play/typescript/primitives/union-and-intersection-types.ts"},{"path":"/zh/play/typescript/primitives/unknown-and-never.ts"},{"path":"/zh/play/typescript/type-primitives/built-in-utility-types.ts"},{"path":"/zh/play/typescript/type-primitives/nullable-types.ts"},{"path":"/zh/play/typescript/type-primitives/tuples.ts"},{"path":"/zh/play/javascript/modern-javascript/immutability.ts"},{"path":"/zh/play/javascript/modern-javascript/async-await.ts"},{"path":"/zh/play/javascript/javascript-essentials/objects-and-arrays.ts"},{"path":"/community"},{"path":"/es/community"},{"path":"/ja/community"},{"path":"/vo/community"},{"path":"/zh/community"},{"path":"/download"},{"path":"/es/download"},{"path":"/ja/download"},{"path":"/vo/download"},{"path":"/zh/download"},{"path":"/empty"},{"path":"/es/empty"},{"path":"/ja/empty"},{"path":"/vo/empty"},{"path":"/zh/empty"},{"path":"/"},{"path":"/es/"},{"path":"/ja/"},{"path":"/vo/"},{"path":"/zh/"},{"path":"/tools"},{"path":"/es/tools"},{"path":"/ja/tools"},{"path":"/vo/tools"},{"path":"/zh/tools"},{"path":"/why-create-typescript"},{"path":"/es/why-create-typescript"},{"path":"/ja/why-create-typescript"},{"path":"/vo/why-create-typescript"},{"path":"/zh/why-create-typescript"},{"path":"/docs/home"},{"path":"/es/docs/home"},{"path":"/ja/docs/home"},{"path":"/vo/docs/home"},{"path":"/zh/docs/home"},{"path":"/dev/playground-plugins/"},{"path":"/dev/sandbox/"},{"path":"/dev/twoslash/"},{"path":"/dev/typescript-vfs/"}]},"markdownRemark":{"id":"aaa839b1-ca24-5a06-900b-5e97160da8df","excerpt":"Babel Install .babelrc Using Command Line Interface package.json Execute Babel from the command line Browserify Install Using Command Line Interface Using API…","html":"<h1 id=\"babel\" style=\"position:relative;\"><a href=\"#babel\" aria-label=\"babel permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Babel</h1>\n<h3 id=\"install\" style=\"position:relative;\"><a href=\"#install\" aria-label=\"install permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install @babel/cli @babel/core @babel/preset-typescript --save-dev</span></code></div></pre>\n<h3 id=\"babelrc\" style=\"position:relative;\"><a href=\"#babelrc\" aria-label=\"babelrc permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>.babelrc</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #000000\">{</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #A31515\">\"presets\"</span><span style=\"color: #000000\">: [</span><span style=\"color: #A31515\">\"@babel/preset-typescript\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<h3 id=\"using-command-line-interface\" style=\"position:relative;\"><a href=\"#using-command-line-interface\" aria-label=\"using command line interface permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using Command Line Interface</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">./node_modules/.bin/babel --out-file bundle.js src/index.ts</span></code></div></pre>\n<h3 id=\"packagejson\" style=\"position:relative;\"><a href=\"#packagejson\" aria-label=\"packagejson permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>package.json</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #000000\">{</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #A31515\">\"scripts\"</span><span style=\"color: #000000\">: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #A31515\">\"build\"</span><span style=\"color: #000000\">: </span><span style=\"color: #A31515\">\"babel --out-file bundle.js main.ts\"</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">}</span></code></div></pre>\n<h3 id=\"execute-babel-from-the-command-line\" style=\"position:relative;\"><a href=\"#execute-babel-from-the-command-line\" aria-label=\"execute babel from the command line permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Execute Babel from the command line</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm run build</span></code></div></pre>\n<h1 id=\"browserify\" style=\"position:relative;\"><a href=\"#browserify\" aria-label=\"browserify permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Browserify</h1>\n<h3 id=\"install-1\" style=\"position:relative;\"><a href=\"#install-1\" aria-label=\"install 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install tsify</span></code></div></pre>\n<h3 id=\"using-command-line-interface-1\" style=\"position:relative;\"><a href=\"#using-command-line-interface-1\" aria-label=\"using command line interface 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using Command Line Interface</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">browserify main.ts -p [ tsify --noImplicitAny ] &gt; bundle.js</span></code></div></pre>\n<h3 id=\"using-api\" style=\"position:relative;\"><a href=\"#using-api\" aria-label=\"using api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using API</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> browserify = require(</span><span style=\"color: #A31515\">\"browserify\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> tsify = require(</span><span style=\"color: #A31515\">\"tsify\"</span><span style=\"color: #000000\">);</span>\n\n<span style=\"color: #000000\">browserify()</span>\n<span style=\"color: #000000\">  .add(</span><span style=\"color: #A31515\">\"main.ts\"</span><span style=\"color: #000000\">)</span>\n<span style=\"color: #000000\">  .plugin(</span><span style=\"color: #A31515\">\"tsify\"</span><span style=\"color: #000000\">, { noImplicitAny: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\"> })</span>\n<span style=\"color: #000000\">  .bundle()</span>\n<span style=\"color: #000000\">  .pipe(process.stdout);</span></code></div></pre>\n<p>More details: <a href=\"https://github.com/smrq/tsify\">smrq/tsify</a></p>\n<h1 id=\"duo\" style=\"position:relative;\"><a href=\"#duo\" aria-label=\"duo permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Duo</h1>\n<h3 id=\"install-2\" style=\"position:relative;\"><a href=\"#install-2\" aria-label=\"install 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install duo-typescript</span></code></div></pre>\n<h3 id=\"using-command-line-interface-2\" style=\"position:relative;\"><a href=\"#using-command-line-interface-2\" aria-label=\"using command line interface 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using Command Line Interface</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">duo --use duo-typescript entry.ts</span></code></div></pre>\n<h3 id=\"using-api-1\" style=\"position:relative;\"><a href=\"#using-api-1\" aria-label=\"using api 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Using API</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> Duo = require(</span><span style=\"color: #A31515\">\"duo\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> fs = require(</span><span style=\"color: #A31515\">\"fs\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> path = require(</span><span style=\"color: #A31515\">\"path\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> typescript = require(</span><span style=\"color: #A31515\">\"duo-typescript\"</span><span style=\"color: #000000\">);</span>\n\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> out = path.join(__dirname, </span><span style=\"color: #A31515\">\"output.js\"</span><span style=\"color: #000000\">);</span>\n\n<span style=\"color: #000000\">Duo(__dirname)</span>\n<span style=\"color: #000000\">  .entry(</span><span style=\"color: #A31515\">\"entry.ts\"</span><span style=\"color: #000000\">)</span>\n<span style=\"color: #000000\">  .use(typescript())</span>\n<span style=\"color: #000000\">  .run(</span><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\">(err, results) {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #0000FF\">if</span><span style=\"color: #000000\"> (err) </span><span style=\"color: #0000FF\">throw</span><span style=\"color: #000000\"> err;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #008000\">// Write compiled result to output file</span>\n<span style=\"color: #000000\">    fs.writeFileSync(out, results.code);</span>\n<span style=\"color: #000000\">  });</span></code></div></pre>\n<p>More details: <a href=\"https://github.com/frankwallis/duo-typescript\">frankwallis/duo-typescript</a></p>\n<h1 id=\"grunt\" style=\"position:relative;\"><a href=\"#grunt\" aria-label=\"grunt permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Grunt</h1>\n<h3 id=\"install-3\" style=\"position:relative;\"><a href=\"#install-3\" aria-label=\"install 3 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install grunt-ts</span></code></div></pre>\n<h3 id=\"basic-gruntfilejs\" style=\"position:relative;\"><a href=\"#basic-gruntfilejs\" aria-label=\"basic gruntfilejs permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic Gruntfile.js</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #000000\">module.exports = </span><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\">(grunt) {</span>\n<span style=\"color: #000000\">  grunt.initConfig({</span>\n<span style=\"color: #000000\">    ts: {</span>\n<span style=\"color: #000000\">      default: {</span>\n<span style=\"color: #000000\">        src: [</span><span style=\"color: #A31515\">\"**/*.ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\"!node_modules/**/*.ts\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">      }</span>\n<span style=\"color: #000000\">    }</span>\n<span style=\"color: #000000\">  });</span>\n<span style=\"color: #000000\">  grunt.loadNpmTasks(</span><span style=\"color: #A31515\">\"grunt-ts\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #000000\">  grunt.registerTask(</span><span style=\"color: #A31515\">\"default\"</span><span style=\"color: #000000\">, [</span><span style=\"color: #A31515\">\"ts\"</span><span style=\"color: #000000\">]);</span>\n<span style=\"color: #000000\">};</span></code></div></pre>\n<p>More details: <a href=\"https://github.com/TypeStrong/grunt-ts\">TypeStrong/grunt-ts</a></p>\n<h1 id=\"gulp\" style=\"position:relative;\"><a href=\"#gulp\" aria-label=\"gulp permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Gulp</h1>\n<h3 id=\"install-4\" style=\"position:relative;\"><a href=\"#install-4\" aria-label=\"install 4 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install gulp-typescript</span></code></div></pre>\n<h3 id=\"basic-gulpfilejs\" style=\"position:relative;\"><a href=\"#basic-gulpfilejs\" aria-label=\"basic gulpfilejs permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic gulpfile.js</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> gulp = require(</span><span style=\"color: #A31515\">\"gulp\"</span><span style=\"color: #000000\">);</span>\n<span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> ts = require(</span><span style=\"color: #A31515\">\"gulp-typescript\"</span><span style=\"color: #000000\">);</span>\n\n<span style=\"color: #000000\">gulp.task(</span><span style=\"color: #A31515\">\"default\"</span><span style=\"color: #000000\">, </span><span style=\"color: #0000FF\">function</span><span style=\"color: #000000\">() {</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">var</span><span style=\"color: #000000\"> tsResult = gulp.src(</span><span style=\"color: #A31515\">\"src/*.ts\"</span><span style=\"color: #000000\">).pipe(</span>\n<span style=\"color: #000000\">    ts({</span>\n<span style=\"color: #000000\">      noImplicitAny: </span><span style=\"color: #0000FF\">true</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">      out: </span><span style=\"color: #A31515\">\"output.js\"</span>\n<span style=\"color: #000000\">    })</span>\n<span style=\"color: #000000\">  );</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #0000FF\">return</span><span style=\"color: #000000\"> tsResult.js.pipe(gulp.dest(</span><span style=\"color: #A31515\">\"built/local\"</span><span style=\"color: #000000\">));</span>\n<span style=\"color: #000000\">});</span></code></div></pre>\n<p>More details: <a href=\"https://github.com/ivogabe/gulp-typescript\">ivogabe/gulp-typescript</a></p>\n<h1 id=\"jspm\" style=\"position:relative;\"><a href=\"#jspm\" aria-label=\"jspm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Jspm</h1>\n<h3 id=\"install-5\" style=\"position:relative;\"><a href=\"#install-5\" aria-label=\"install 5 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install -g jspm@beta</span></code></div></pre>\n<p><em>Note: Currently TypeScript support in jspm is in 0.16beta</em></p>\n<p>More details: <a href=\"https://github.com/Microsoft/TypeScriptSamples/tree/master/jspm\">TypeScriptSamples/jspm</a></p>\n<h1 id=\"webpack\" style=\"position:relative;\"><a href=\"#webpack\" aria-label=\"webpack permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Webpack</h1>\n<h3 id=\"install-6\" style=\"position:relative;\"><a href=\"#install-6\" aria-label=\"install 6 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Install</h3>\n<pre class=\"shiki\"><div class=\"language-id\">sh</div><div class='code-container'><code><span style=\"color: #000000\">npm install ts-loader --save-dev</span></code></div></pre>\n<h3 id=\"basic-webpackconfigjs-when-using-webpack-2\" style=\"position:relative;\"><a href=\"#basic-webpackconfigjs-when-using-webpack-2\" aria-label=\"basic webpackconfigjs when using webpack 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic webpack.config.js when using Webpack 2</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #000000\">module.exports = {</span>\n<span style=\"color: #000000\">  entry: </span><span style=\"color: #A31515\">\"./src/index.tsx\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">  output: {</span>\n<span style=\"color: #000000\">    path: </span><span style=\"color: #A31515\">\"/\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">    filename: </span><span style=\"color: #A31515\">\"bundle.js\"</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  resolve: {</span>\n<span style=\"color: #000000\">    extensions: [</span><span style=\"color: #A31515\">\".tsx\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".js\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".json\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  module: {</span>\n<span style=\"color: #000000\">    rules: [</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #008000\">// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'</span>\n<span style=\"color: #000000\">      { test:</span><span style=\"color: #A31515\"> /\\.tsx</span><span style=\"color: #000000\">?</span><span style=\"color: #0000FF\">$</span><span style=\"color: #A31515\">/</span><span style=\"color: #000000\">, use: [</span><span style=\"color: #A31515\">\"ts-loader\"</span><span style=\"color: #000000\">], exclude:</span><span style=\"color: #A31515\"> /node_modules/</span><span style=\"color: #000000\"> }</span>\n<span style=\"color: #000000\">    ]</span>\n<span style=\"color: #000000\">  }</span>\n<span style=\"color: #000000\">};</span></code></div></pre>\n<h3 id=\"basic-webpackconfigjs-when-using-webpack-1\" style=\"position:relative;\"><a href=\"#basic-webpackconfigjs-when-using-webpack-1\" aria-label=\"basic webpackconfigjs when using webpack 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic webpack.config.js when using Webpack 1</h3>\n<pre class=\"shiki\"><div class=\"language-id\">js</div><div class='code-container'><code><span style=\"color: #000000\">module.exports = {</span>\n<span style=\"color: #000000\">  entry: </span><span style=\"color: #A31515\">\"./src/index.tsx\"</span><span style=\"color: #000000\">,</span>\n<span style=\"color: #000000\">  output: {</span>\n<span style=\"color: #000000\">    filename: </span><span style=\"color: #A31515\">\"bundle.js\"</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  resolve: {</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #008000\">// Add '.ts' and '.tsx' as a resolvable extension.</span>\n<span style=\"color: #000000\">    extensions: [</span><span style=\"color: #A31515\">\"\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".webpack.js\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".web.js\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".ts\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".tsx\"</span><span style=\"color: #000000\">, </span><span style=\"color: #A31515\">\".js\"</span><span style=\"color: #000000\">]</span>\n<span style=\"color: #000000\">  },</span>\n<span style=\"color: #000000\">  module: {</span>\n<span style=\"color: #000000\">    rules: [</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #008000\">// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'</span>\n<span style=\"color: #000000\">      { test:</span><span style=\"color: #A31515\"> /\\.tsx</span><span style=\"color: #000000\">?</span><span style=\"color: #0000FF\">$</span><span style=\"color: #A31515\">/</span><span style=\"color: #000000\">, loader: </span><span style=\"color: #A31515\">\"ts-loader\"</span><span style=\"color: #000000\"> }</span>\n<span style=\"color: #000000\">    ]</span>\n<span style=\"color: #000000\">  }</span>\n<span style=\"color: #000000\">};</span></code></div></pre>\n<p>See <a href=\"https://www.npmjs.com/package/ts-loader\">more details on ts-loader here</a>.</p>\n<p>Alternatives:</p>\n<ul>\n<li><a href=\"https://www.npmjs.com/package/awesome-typescript-loader\">awesome-typescript-loader</a></li>\n</ul>\n<h1 id=\"msbuild\" style=\"position:relative;\"><a href=\"#msbuild\" aria-label=\"msbuild permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>MSBuild</h1>\n<p>Update project file to include locally installed <code>Microsoft.TypeScript.Default.props</code> (at the top) and <code>Microsoft.TypeScript.targets</code> (at the bottom) files:</p>\n<pre class=\"shiki\"><div class=\"language-id\">xml</div><div class='code-container'><code><span style=\"color: #800000\">&lt;?xml</span><span style=\"color: #DC0000\"> version</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"1.0\"</span><span style=\"color: #DC0000\"> encoding</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"utf-8\"</span><span style=\"color: #800000\">?&gt;</span>\n<span style=\"color: #800000\">&lt;Project</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">ToolsVersion</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"4.0\"</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">DefaultTargets</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"Build\"</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">xmlns</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"http://schemas.microsoft.com/developer/msbuild/2003\"</span><span style=\"color: #800000\">&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #008000\">&lt;!-- Include default props at the top --&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;Import</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #DC0000\">Project</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\TypeScript\\Microsoft.TypeScript.Default.props\"</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #DC0000\">Condition</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"Exists('$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\TypeScript\\Microsoft.TypeScript.Default.props')\"</span><span style=\"color: #000000\"> </span><span style=\"color: #800000\">/&gt;</span>\n\n<span style=\"color: #000000\">  </span><span style=\"color: #008000\">&lt;!-- TypeScript configurations go here --&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;PropertyGroup</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">Condition</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"'$(Configuration)' == 'Debug'\"</span><span style=\"color: #800000\">&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;TypeScriptRemoveComments&gt;</span><span style=\"color: #000000\">false</span><span style=\"color: #800000\">&lt;/TypeScriptRemoveComments&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;TypeScriptSourceMap&gt;</span><span style=\"color: #000000\">true</span><span style=\"color: #800000\">&lt;/TypeScriptSourceMap&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/PropertyGroup&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;PropertyGroup</span><span style=\"color: #000000\"> </span><span style=\"color: #DC0000\">Condition</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"'$(Configuration)' == 'Release'\"</span><span style=\"color: #800000\">&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;TypeScriptRemoveComments&gt;</span><span style=\"color: #000000\">true</span><span style=\"color: #800000\">&lt;/TypeScriptRemoveComments&gt;</span>\n<span style=\"color: #000000\">    </span><span style=\"color: #800000\">&lt;TypeScriptSourceMap&gt;</span><span style=\"color: #000000\">false</span><span style=\"color: #800000\">&lt;/TypeScriptSourceMap&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;/PropertyGroup&gt;</span>\n\n<span style=\"color: #000000\">  </span><span style=\"color: #008000\">&lt;!-- Include default targets at the bottom --&gt;</span>\n<span style=\"color: #000000\">  </span><span style=\"color: #800000\">&lt;Import</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #DC0000\">Project</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\TypeScript\\Microsoft.TypeScript.targets\"</span>\n<span style=\"color: #000000\">      </span><span style=\"color: #DC0000\">Condition</span><span style=\"color: #000000\">=</span><span style=\"color: #0000FF\">\"Exists('$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)\\TypeScript\\Microsoft.TypeScript.targets')\"</span><span style=\"color: #000000\"> </span><span style=\"color: #800000\">/&gt;</span>\n<span style=\"color: #800000\">&lt;/Project&gt;</span></code></div></pre>\n<p>More details about defining MSBuild compiler options: <a href=\"./Compiler%20Options%20in%20MSBuild.md\">Setting Compiler Options in MSBuild projects</a></p>\n<h1 id=\"nuget\" style=\"position:relative;\"><a href=\"#nuget\" aria-label=\"nuget permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>NuGet</h1>\n<ul>\n<li>Right-Click -> Manage NuGet Packages</li>\n<li>Search for <code>Microsoft.TypeScript.MSBuild</code></li>\n<li>Hit <code>Install</code></li>\n<li>When install is complete, rebuild!</li>\n</ul>\n<p>More details can be found at <a href=\"http://docs.nuget.org/Consume/Package-Manager-Dialog\">Package Manager Dialog</a> and <a href=\"https://github.com/Microsoft/TypeScript/wiki/Nightly-drops#using-nuget-with-msbuild\">using nightly builds with NuGet</a></p>","headings":[{"value":"Babel","depth":1},{"value":"Install","depth":3},{"value":".babelrc","depth":3},{"value":"Using Command Line Interface","depth":3},{"value":"package.json","depth":3},{"value":"Execute Babel from the command line","depth":3},{"value":"Browserify","depth":1},{"value":"Install","depth":3},{"value":"Using Command Line Interface","depth":3},{"value":"Using API","depth":3},{"value":"Duo","depth":1},{"value":"Install","depth":3},{"value":"Using Command Line Interface","depth":3},{"value":"Using API","depth":3},{"value":"Grunt","depth":1},{"value":"Install","depth":3},{"value":"Basic Gruntfile.js","depth":3},{"value":"Gulp","depth":1},{"value":"Install","depth":3},{"value":"Basic gulpfile.js","depth":3},{"value":"Jspm","depth":1},{"value":"Install","depth":3},{"value":"Webpack","depth":1},{"value":"Install","depth":3},{"value":"Basic webpack.config.js when using Webpack 2","depth":3},{"value":"Basic webpack.config.js when using Webpack 1","depth":3},{"value":"MSBuild","depth":1},{"value":"NuGet","depth":1}],"frontmatter":{"permalink":"/docs/handbook/integrating-with-build-tools.html","title":"Integrating with Build Tools"}}},"pageContext":{"slug":"/docs/handbook/integrating-with-build-tools.html","isOldHandbook":true}}}