首页 > 其他分享 >[Typescript] Build mode of tsc: tsc -b

[Typescript] Build mode of tsc: tsc -b

时间:2024-09-03 21:24:51浏览次数:5  
标签:Typescript -- tsc json Build tsconfig projects build

A long-awaited feature is smart incremental builds for TypeScript projects. In 3.0 you can use the --build flag with tsc. This is effectively a new entry point for tsc that behaves more like a build orchestrator than a simple compiler.

Running tsc --build (tsc -b for short) will do the following:

  • Find all referenced projects
  • Detect if they are up-to-date
  • Build out-of-date projects in the correct order

You can provide tsc -b with multiple config file paths (e.g. tsc -b src test). Just like tsc -p, specifying the config file name itself is unnecessary if it’s named tsconfig.json.

> tsc -b                            # Use the tsconfig.json in the current directory
 > tsc -b src                        # Use src/tsconfig.json
 > tsc -b foo/prd.tsconfig.json bar  # Use foo/prd.tsconfig.json and bar/tsconfig.json

Don’t worry about ordering the files you pass on the commandline - tsc will re-order them if needed so that dependencies are always built first.

There are also some flags specific to tsc -b:

  • --verbose: Prints out verbose logging to explain what’s going on (may be combined with any other flag)
  • --dry: Shows what would be done but doesn’t actually build anything
  • --clean: Deletes the outputs of the specified projects (may be combined with --dry)
  • --force: Act as if all projects are out of date
  • --watch: Watch mode (may not be combined with any flag except --verbose)

 

标签:Typescript,--,tsc,json,Build,tsconfig,projects,build
From: https://www.cnblogs.com/Answer1215/p/18395487

相关文章

  • npm install时一直idealTree:npm: sill idealTree buildDeps的解决方案
    修改下镜像的地址。1、采用新的镜像地址,进入cmd之后输入://1.npm的命令npmconfigsetregistryhttps://registry.npmmirror.com//2.yarn的命令yarnconfigsetregistryhttps://registry.npmmirror.com2、查看是否安装成功://npm的命令npmconfiggetregi......
  • 前端Vue3项目VUE3+TypeScript企业级前端Vue项目
    前端Vue3项目VUE3+TypeScript企业级前端Vue项目‌Vue3+SpringBoot前端项目实战:‌智慧实验室管理平台‌在当今数字化快速发展的时代,‌智慧实验室管理平台的建设成为了提升科研效率与管理水平的关键一环。‌本文将通过一个实战案例,‌详细介绍如何使用Vue3和SpringBoot技术栈构建......
  • TypeScript+Vue3+组合式API编码前端开发
    1.Vue3简介·2020年9月18日,Vue.js发布版3.0版本,代号:0nePiece (海贼王)·经历了:4800+次提交、40+个RFC、600+次PR、300+贡献者·官方发版地址:Releasev3.0.0OnePiece·vuejs/core 1.1.【性能的提升】打包大小减少41%。初次渲染快55%,更新渲染快133%。内存减......
  • Vue3+TypeScript+Vite+Pinia+ElementPlus开发项目在线医疗服务平台
     前言随着vue3.0的越来越受欢迎,开始有许多公司和个人开始学习并使用vue3开发项目。我从接触学习并使用vue2,到现在的vue3,工作中也一直在使用vue。vue3也发布很长时间了,目前vue3+vite+ts再结合一些优秀的UI框架,如Elementplus,Antdesign,NaiveUI,移动端的VantUI,成为了较为流......
  • Unity 脚本编译和构建(Build)说明(官方文档翻译校正)
    目录脚本重要概念事件函数的执行顺序脚本生命周期概述流程图的范围脚本生命周期流程图一般原则第一次场景加载(FirstSceneload)场景加载和卸载之前(Beforesceneloadandunload)Editor第一帧更新之前(Beforethefirstframeupdate)帧之间(Inbetweenframes)更新顺序(Upda......
  • [Typescript Library] Navigate to Source Files instead of Declaration Files
    Thesolutionistomodifythe tsconfig.json filetoenable declarationMap underthe compilerOptions.//insidetsconfig.json{"compilerOptions":{"declaration":true,"declarationMap":true//...Byenabling ......
  • 迅为电子RK3588S开发板第三章Buildroot系统功能测试
      iTOP-3588S开发板采用瑞芯微RK3588S处理器,是全新一代AloT高端应用芯片,采用8nmLP制程,搭载八核64位CPU(四核Cortex-A76+四核Cortex-A55架构),集成MaliG610MP4四核GPU,内置AI加速器NPU,算力达6Tops,支持8K视频硬件编码器和硬件解码器,提供了许多功能强大的嵌入式硬件引擎,性能更强......
  • Lecture 03 How to build a Game World
    Lecture03HowtobuildaGameWorldEverythingisaGameObject(GO)面向对象的方式有些GO之间并没有清晰的继承关系Unreal中的UObject、Unity中的Object并不是这里讲的GameObject概念,而是更类似如C#中的Object,用于确定任何对象的生命周期需要的句柄Unreal中的GameOb......
  • typescript 中type和interface的区别
    在TypeScript中,type和interface都是用来定义类型别名的工具,但它们之间有一些细微的区别。了解这些区别有助于更好地选择何时使用哪一个。相同点类型定义:两者都可以用来定义对象的形状(shape),即指定一个对象应该具有哪些属性、方法及其类型。可选属性:都可以定义可选属性......
  • buildroot linux 添加QT自动启动桌面
    /etc/init.d/S99QTDesktop#!/bin/sh##Start/stopQTdesktop#exportXDG_RUNTIME_DIR=/usr/qt-armhf/lib#配置tslibexportTSLIB_TSDEVICE=/dev/input/event1exportTSLIB_CALIBFILE=/etc/pointercalexportTSLIB_CONFFILE=/etc/ts.confexportTSLIB_PLUGINDIR=/usr/lib/tse......