Skip to content

feat: split CLI into smartwrap-cli so core installs without yargs - #24

Open
tecfu wants to merge 1 commit into
masterfrom
split-cli-core
Open

tecfu wants to merge 1 commit into
masterfrom
split-cli-core

Conversation

@tecfu

@tecfu tecfu commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #19.

Library users who only need text wrapping no longer have to install yargs or the CLI binary.

Install Package Contents
npm install smartwrap smartwrap (root) Core library only
npm install -g smartwrap-cli packages/smartwrap-cli smartwrap binary + yargs

Same repository; two publishable packages. No second remote/repo.

Details

  • Removed bin and yargs from the core package.json
  • Moved src/terminal-adapter.js → packages/smartwrap-cli/src/
  • CLI depends on smartwrap + yargs
  • README documents the install matrix and local CLI linking

This branch is based on modernize-v3 (#23), so it also includes the Node 12+ modernization, dependency cleanup, and CI updates from that PR.

Test plan

  • npm test (25 passing) on core package
  • Core dependencies are only breakword, strip-ansi, wcwidth
  • Core package has no bin field
  • After merge: publish smartwrap@3 then smartwrap-cli@3
  • npm install smartwrap does not install yargs
  • npm install -g smartwrap-cli provides working smartwrap binary

Closes #19.

Library users who only need text wrapping no longer pull in yargs or the
CLI binary.

- smartwrap (root): core TypeScript library only (strip-ansi, wcwidth)
- packages/smartwrap-cli: separate package with the smartwrap bin + yargs
- Remove src/terminal-adapter.ts and bin field from the core package
- README documents the install matrix

Rebased onto master after the TypeScript rewrite (#25) and long-word
perf fix (#26).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

break into CLI and core packages

1 participant