update-index-exports

Update fe-tools package index.ts exports and validate tests for new modules.

207|39|Updated Aug 29, 2017
One-click install
npx skills add https://github.com/MichealWayne/fe-tools --skill update-index-exports
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-index-exports
Source: https://github.com/MichealWayne/fe-tools/tree/main/utils/skills/update-index-exports
Command: npx skills add https://github.com/MichealWayne/fe-tools --skill update-index-exports

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Update package exports in fe-tools when a new function/module is added and src/index.ts needs to expose it, or when export lists need cleanup.

Core Features & Use Cases

  • Identify the target package under packages/ and determine the module owning the new functionality.
  • Update or add the corresponding exports in packages/<pkg>/src/index.ts, ensuring no duplicates and preserving a clear order.
  • Enforce that new modules have accompanying tests in packages/<pkg>/tests/ to validate public APIs.

Quick Start

Identify the target package and update its src/index.ts exports to expose the new module.

Frequently Asked Questions about update-index-exports

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update package exports in a TypeScript monorepo when adding new modules?

To update package exports in a TypeScript monorepo, locate the owning package under packages/, edit its src/index.ts file to add the new exports while preventing duplicates, and preserve a clean API surface order.

What is the best way to keep fe-tools exports in sync with new modules?

Keeping fe-tools exports in sync involves updating the public exports in packages/<pkg>/src/index.ts when new functions are added, ensuring the export lists avoid duplicates and maintain a clear order for a clean API surface.

Do I need to add tests when exposing new modules from a monorepo package?

Yes, you need to add tests when exposing new modules. The workflow enforces that new modules have accompanying tests in packages/<pkg>/__tests__/ to validate the newly exposed public APIs.

How do I clean up duplicate exports in a TypeScript index.ts file?

To clean up duplicate exports in a TypeScript index.ts file, the workflow modifies the export lists by adding or adjusting entries while ensuring no duplicates exist and preserving a clear, ordered API surface.

Can I use this workflow to adjust existing exports for a cleaner API surface?

Yes, you can use this workflow to adjust existing exports. It targets monorepo packages by editing index.ts exports to clean up export lists, avoid duplicates, and maintain a clean public API surface.