Skip to content

🪝 Add tsc hooks to your TypeScript project

License

Notifications You must be signed in to change notification settings

jazamb/tsc-hooks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Compiler Hooks

Installation

For Project Specific tsc:

yarn add tsc-hooks --dev

For Global tsc:

yarn global add tsc-hooks

Getting Started

Example tsconfig.json

{
  "compilerOptions": {
    "outDir": "dist"
  },
  "include": [ "src/**/*" ],
  "exclude": [ "src/**/*.txt" ],
  "hooks": [ "copy-files" ] // hooks is a new property you can add to tsconfig to add custom hooks
  
  /* For more hooks look bellow... */
}

Available Hooks

Hook ID Description Author
copy-files tsc does not copy over extra files like .xml, .txt, .html, etc. after compilation. This hook fixes this by copying over files specified in "include". It also ignores files specified in "exclude". Mark Auger (swimauger)
<your-hook-id> Learn how to create your own hook here <Your name here>

What Can TSC Hooks Do?

  • TypeScript Compiler hooks are scripts that can execute on compilation of your TypeScript project using tsc
  • They can provide new tsconfig options to help your project run smoother
  • They can add new functionality to the compilation process

About

🪝 Add tsc hooks to your TypeScript project

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%