Skip to content

A tiny Go CLI for generating index.ts and index.tsx files within a TypeScript project, helpful for re-exporting in a library or a monorepo. It recursively scans the codebase, respects ignore patterns, and operates without any external dependencies.

Notifications You must be signed in to change notification settings

ashrhmn/tsndexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tsndexer

A tiny Go CLI to generate index.ts / index.tsx files for your TypeScript codebase.

Features

  • Recursively scans your project for .ts / .tsx (skips .d.ts and existing index.*)
  • Enforces a configurable max file-count (default 10000)
  • Chooses .tsx for an index if any .tsx is found in its subtree
  • Exports all immediate files and subfolders that contain TS(X)
  • Supports ignore patterns (default: node_modules, .git etc.)
  • Supports --dry-run, --verbose
  • Zero dependencies beyond the Go stdlib

Install

# with Go 1.18+ installed:
go install github.com/ashrhmn/tsndexer@latest

# or, clone & build manually:
git clone https://github.com/ashrhmn/tsndexer.git
cd tsndexer
go build -o tsndexer .

About

A tiny Go CLI for generating index.ts and index.tsx files within a TypeScript project, helpful for re-exporting in a library or a monorepo. It recursively scans the codebase, respects ignore patterns, and operates without any external dependencies.

Resources

Stars

Watchers

Forks

Languages