Loading...
Loading...
Learn the rules of packlets for managing a JavaScript/TypeScript project. Use this skill whenever a user mentions packlets or when working in a project with packlets (src/packlets) directory.
npx skill4agent add dtinth/agent-skills packlets./src/packlets/<name>/index.tsindex.tsindex.tssrc/logging/*.tssrc/data-model/*.tssrc/reports/*.tssrc/*.tssrc/logging/src/reportssrc/logging@my-app/logging@my-app/data-model@my-app/reports@my-app/applicationpackage.jsonsrc/packlets/logging/*.tssrc/packlets/data-model/*.tssrc/packlets/reports/*.tssrc/*.ts./src/packlets/<packlet-name>/index.ts<packlet-name>src/packlets/controls
src/packlets/logger
src/packlets/my-long-nameNOTE: Thecannot be nested deeper in the tree. Like with NPM packages,packletsis a flat namespace.src/packlets
// Okay
import { MainReport } from '../packlets/reports';
// Error: The import statement does not use the packlet's entry point (@rushstack/packlets/mechanics)
import { MainReport } from '../packlets/reports/index';
// Error: The import statement does not use the packlet's entry point (@rushstack/packlets/mechanics)
import { MainReport } from '../packlets/reports/MainReport';// Okay
import { MessageType } from "./MessageType";
// Error: Files under a packlet folder must not import from their own index.ts file (@rushstack/packlets/mechanics)
import { MessageType } from ".";
// Error: Files under a packlet folder must not import from their own index.ts file (@rushstack/packlets/mechanics)
import { MessageType } from "./index";// Okay
import { Logger } from '../../packlets/logging';// Error: Packlet imports create a circular reference: (@rushstack/packlets/circular-deps)
// "logging" is referenced by src/packlets/data-model/DataModel.ts
// "data-model" is referenced by src/packlets/logging/Logger.ts
import { DataModel } from '../../packlets/data-model';// Okay
import { MainReport } from '../packlets/reports';// Error: A local project file cannot be imported. A packlet's dependencies must be
// NPM packages and/or other packlets. (@rushstack/packlets/mechanics)
import { App } from '../../app/App';