Setup TypeScript Gitignore
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Create or refresh the root .gitignore for a TypeScript/npm project, mirroring `iru-setup-java-gitignore’s
contract for the npm ecosystem — never overwriting an existing file without showing the user exactly what would
change and getting explicit approval first.
Purpose
iru-setup-typescript-gitignore composes a TypeScript-appropriate .gitignore: a universal base
(node_modules/, build/output directories, test/coverage output, TypeScript incremental-build info, lint caches,
env files, OS/editor noise) plus conditionally-detected sections for whichever package manager, frontend
framework, and documentation tooling are actually present in the target repository — pnpm/Yarn debug logs,
Angular, React/Vite (and Storybook), NestJS (logs, runtime and diagnostic files, test reports), Next.js (.next/,
next-env.d.ts, .vercel, matching create-next-app), a Prisma client generated inside the source tree (the path is
read from schema.prisma; migrations are never ignored), the repository-wide .integration-test.lock/ used by the
NestJS/Next.js/React Native coding and e2e skills, React Native (Expo, or a bare Metro/React Native CLI app — Gradle, Xcode, CocoaPods and Bundler outputs, signing
material, and keeping the template’s committed debug.keystore; paths are prefixed with the app subdirectory when the
app does not live at the root), Ionic/Capacitor, Playwright, the UI tests' .ui-screenshots/ capture directory (every UI project — React, Angular, Ionic, Next.js, React Native, Hilla; the catalog’s UI contract), Turborepo, Istanbul/nyc,
Antora docs build output, TypeDoc/Compodoc API docs, and a Spring Boot + Vaadin Hilla frontend embedded in a
Maven project. It never invents entries for things that aren’t actually present. If .gitignore already exists,
it is treated as sensitive: the skill announces it is updating rather than creating from scratch, reads it, composes
a merged draft (hand-added lines kept) and a template-only draft, and shows the user a diff, then asks Update / Keep
as is / Replace before writing anything.
Plugin
Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).
Invocation
/iru-setup-typescript-gitignore
Optionally with an args line (key: value) for scripted runs:
/iru-setup-typescript-gitignore
args:
on-existing: update
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
How to treat an existing |
|
Everything else is derived by exploring the target repository directly (package.json’s `packageManager field and
lockfile, angular.json, vite.config., .storybook/, nest-cli.json, next.config., prisma/schema.prisma, app.json with an "expo" key, metro.config.js, capacitor.config.,
playwright.config., turbo.json, .nycrc, docs/antora.yml / docs/antora-playbook.yml, typedoc.json, and a
pom.xml depending on hilla-spring-boot-starter / com.vaadin:hilla or a src/main/frontend/ directory).
Outputs
-
A
.gitignorefile at the repository root — newly created, updated (merged), replaced, or left untouched. -
If
.gitignoredidn’t previously exist: the run is announced as "from scratch" and the file is written directly, no approval step needed. -
If
.gitignorealready existed: the run is announced as "updating existing", and a diff of the merged draft is shown first (viagit diff --no-index). The user is asked Update (merged draft; hand-added lines kept), Keep as is (nothing written) or Replace (template-only draft; the hand-added lines that would be lost are listed) — oron-existinganswers it. If the merged draft is identical to the current file, the question is skipped and the outcome is "kept as is". -
A closing report naming which conditional sections (package manager, Angular, React/Vite, NestJS, Next.js, Prisma client, integration-test lock, React Native (Expo or Metro), Ionic/Capacitor, Playwright, Turborepo, nyc, Antora, TypeDoc/Compodoc, Hilla) were included versus skipped and why, the action taken (created / updated / replaced / kept as is, and whether it came from the user or
on-existing), which hand-added lines were preserved or dropped, plus warnings that detection is heuristic and that already-tracked files under a newly-ignored directory need a manualgit rm -r --cached.
Execution flow
Dependencies
Invokes
None — iru-setup-typescript-gitignore is a leaf skill; it does not call any other skill in this catalog.
Invoked by
-
Setup TypeScript Repository — Step 7, root .gitignore, via the
iru-isolated-skill-executoragent.
Source
SKILL.md on GitHub — the file this page was generated from.