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

feat: split CLI into smartwrap-cli so core installs without yargs#24
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.jspackages/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

Resolves #19: library consumers can install only the core package
without pulling in yargs or the CLI binary.

- smartwrap (root): core library only — breakword, strip-ansi, wcwidth
- packages/smartwrap-cli: separate package providing the `smartwrap` bin
  and depending on smartwrap + yargs
- Update README with install matrix and migration notes
- Remove bin field from the core package.json
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