npm.io
0.16.6 • Published yesterday

@ttsc/banner

Licence
MIT
Version
0.16.6
Deps
0
Size
38 kB
Vulns
0
Weekly
505
Stars
171

@ttsc/banner

banner of @ttsc/banner

GitHub license NPM Version NPM Downloads Build Status Guide Documents Discord Badge

@ttsc/banner adds a fixed @packageDocumentation JSDoc banner to the output.

Setup

Install ttsc and TypeScript-Go, then the banner plugin:

npm install -D ttsc typescript@rc
npm install -D @ttsc/banner

Register the plugin in your tsconfig.json:

// tsconfig.json
{
  "compilerOptions": {
    "plugins": [
      { "transform": "@ttsc/banner" }
    ]
  }
}

Drop a banner.config.ts next to your tsconfig.json:

// banner.config.ts
import type { ITtscBannerConfig } from "@ttsc/banner";

export default {
  text: "License MIT (c) 2026 Acme",
} satisfies ITtscBannerConfig;

A banner.config.* file always exports an object with a text string.

Run your normal ttsc command:

npx ttsc

If @ttsc/banner is installed and no banner.config.* file is found, the compile fails.

Configuration

@ttsc/banner discovers its config by walking upward from the tsconfig directory, looking for banner.config.{ts,cts,mts,js,cjs,mjs,json}.

To point at a specific file instead of using auto-discovery, set configFile on the tsconfig entry:

// tsconfig.json
{
  "compilerOptions": {
    "plugins": [
      { "transform": "@ttsc/banner", "configFile": "./config/banner.config.ts" }
    ]
  }
}

The plugin formats every line of the resolved text inside a JSDoc block and appends @packageDocumentation.

The banner follows TypeScript's normal comment emit policy, so removeComments: true removes it.

Sponsors

Sponsors

Thanks for your support.

Your donation encourages ttsc development.

Keywords