tsc --project

Tony·2022년 5월 3일
0

typescript

목록 보기
9/21

tsc --project

Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.

  • 타입스크립트 파일을 자바스크립트로 변환(컴파일)

e.g., Ts.ED 프로젝트 빌드

// package.json
{
  // ...
  "scripts": {
    "build": "yarn run tsc --project tsconfig.compile.json"
    // ...
  },
  // ...
}
// tsconfig.compile.json
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "baseUrl": ".",
    "outDir": "./dist",
    "moduleResolution": "node",
    "declaration": true,
    "noResolve": false,
    "preserveConstEnums": true,
    "sourceMap": true,
    "noEmit": false,
    "emitDeclarationOnly": false,
    "inlineSources": true
  }
}
profile
움직이는 만큼 행복해진다

0개의 댓글