@joycostudio/scripts
v0.0.5
Published
Joyco utility scripts as a pnpx CLI
Downloads
511
Readme
@joycostudio/scripts
Joyco utility scripts bundled as a pnpx CLI.
Usage
pnpx @joycostudio/scripts --help
pnpx @joycostudio/scripts compress ./images ./output --quality 80
pnpx @joycostudio/scripts resize ./images ./output --width 1920 --height 1080
pnpx @joycostudio/scripts sequence -z 4 ./frames ./output/frame_%n.png
pnpx @joycostudio/scripts fix-svg src --dry --print
pnpx @joycostudio/scripts agents -s codexFor local development, build the CLI before running it directly:
pnpm build
node dist/cli.js --helpAdding a new script
- Add or update the core logic in
src/core/so it can be unit tested without spawning the CLI. - Create a new command module in
src/commands/that exports aregister(program)function. - Wire the new command into
src/cli.tsby adding it to the registrations list.
Commands own their Commander configuration directly (args/options/help/examples), so you can use full Commander features when needed.
🦋 Version Management
This library uses Changesets to manage versions and publish releases.
Adding a changeset
When you make changes that need to be released:
pnpm changesetThis will prompt you to:
- Select which packages you want to include in the changeset
- Choose whether it's a major/minor/patch bump
- Provide a summary of the changes
Creating a release
To create a new version and update the changelog:
# 1. Create new versions of packages
pnpm version:package
# 2. Release (publishes to npm)
pnpm releaseRemember to commit all changes after creating a release.
🤖 Automatic Workflows
This package comes with two GitHub Actions workflows:
Release Workflow (
.github/workflows/release.yml): Automates the release process using Changesets. It will automatically create release pull requests and publish to npm when changes are pushed to the main branch.Publish Any Commit (
.github/workflows/publish-any-commit.yml): Builds and publishes packages for any commit or pull request using pkg.pr.new.
Note: For the PR preview workflow, you need to install PKG.PR.NEW on the target repository.
Note: For the release workflow, you need to add an
NPM_TOKENsecret to your repository settings.
