Skip to content

Publish the decoder command and SDK to npm - #1

Merged
primitiveailabs merged 1 commit into
mainfrom
make/npm-package
Nov 25, 2026
Merged

primitiveailabs merged 1 commit into
mainfrom
make/npm-package

Conversation

@primitiveailabs

Copy link
Copy Markdown
Contributor

Makes primitive-decoder installable from npm:

  • npm install -g primitive-decoder gives a decoder command; npx primitive-decoder <command> also works.
  • import { DecoderSDK } from 'primitive-decoder' with type declarations that work under nodenext and bundler resolution.
  • lib/ is built on npm pack / npm publish (scripts/build-package.mjs); prepublishOnly runs the full check.
  • React, lucide and the font packages are only used by the web app, so they move to devDependencies. The three.js add-ons are bundled from their ES module builds, so Node loads a single copy of three.

Checked by packing the tarball, installing it in an empty folder and running every CLI command, an SDK import, and a consumer typecheck. npm run check passes.

Builds lib/ with esbuild and type declarations, adds the decoder bin and package exports, and keeps the web app's React, icon and font packages out of the install.
@primitiveailabs
primitiveailabs merged commit b357550 into main Nov 25, 2026
1 check passed
@primitiveailabs
primitiveailabs deleted the make/npm-package branch November 25, 2026 23:59
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.

1 participant