Skip to content

monorepo/add-package

Source

add-ts-package.ts

Usage

bash
npm exec saf-workflow kickoff monorepo/add-package <name> <path>

To run this workflow automatically, tell the agent to:

  1. Navigate to the target package
  2. Run this command
  3. Follow the instructions until done

Checklist

When run, the workflow will:

  • Copy template files and rename placeholders.
  • The file 'packages/my-lib/package.json' has been created. Please update the "description" field and any other fields as needed, such as dependencies on other SAF libraries.
  • Ensure the new package path 'packages/my-lib' is included in the "workspaces" array in the root package.json.
  • Change working directory to packages/my-lib
  • Run npm install
  • Run npm run test

Help Docs

bash
Usage: npm exec saf-workflow kickoff monorepo/add-package <name> <path>

Creates a new TypeScript package according to monorepo best practices.

Arguments:
  name        The desired package name, including scope (e.g., @your-org/package-name)
              Example: "@example-org/example-package"
  path        The RELATIVE path from monorepo root where the package directory (containing package.json) will be created (e.g., packages/my-lib or saflib/node)
              Example: "packages/my-lib"