@rehanqasimk/happy-new-year
v1.3.0
Published
A fun CLI tool that displays ASCII fireworks and a Happy New Year message. Inspired by firew0rks.
Maintainers
Readme
@rehanqasimk/happy-new-year 🎉
A fun CLI tool that displays colorful ASCII fireworks and a Happy New Year message!
Installation
This package is published to both npm registry and GitHub Packages. You can use either one!
From npm Registry (Easiest - No configuration needed!)
npx @rehanqasimk/happy-new-yearOr install globally:
npm install -g @rehanqasimk/happy-new-year
happy-new-yearFrom GitHub Packages
Step 1: Configure npm to use GitHub Packages for the @rehanqasimk scope.
You can do this in one of two ways:
Option A: Using npm config (Recommended)
npm config set @rehanqasimk:registry https://npm.pkg.github.comOption B: Create/edit ~/.npmrc file
Add this line to your ~/.npmrc file (create it if it doesn't exist):
@rehanqasimk:registry=https://npm.pkg.github.comStep 2: Run the package
npx @rehanqasimk/happy-new-yearNote: Since this is a public package, you don't need authentication. However, if you encounter authentication errors, you can authenticate with:
npm login --scope=@rehanqasimk --registry=https://npm.pkg.github.comUsage
Simply run the command:
npx @rehanqasimk/happy-new-yearThis will display colorful ASCII fireworks followed by a Happy New Year message from Rehan Qasim.
Publishing
This package is published to both GitHub Packages and npm registry. The GitHub Actions workflow automatically publishes to both when you push a git tag.
Automated Publishing (Recommended)
The package uses GitHub Actions to automatically build and publish to both registries when you push a git tag.
Prerequisites:
- GitHub Personal Access Token (PAT) with
read:packagesandwrite:packagespermissions- Add as secret:
ACCESS_TOKENin your GitHub repository settings
- Add as secret:
- npm Access Token with publish permission
- Get from: https://www.npmjs.com/settings/YOUR_USERNAME/tokens
- Add as secret:
NPM_TOKENin your GitHub repository settings
Steps to publish:
- Update the version in
package.json:
# Edit package.json and update the version (e.g., "1.0.8")- Commit and push your changes:
git add package.json
git commit -m "Bump version to 1.0.8"
git push- Create and push a git tag (this triggers the automated publish workflow):
git tag v1.0.8
git push origin v1.0.8The GitHub Actions workflow will automatically:
- Build the package
- Verify the tag version matches
package.json - Publish to GitHub Packages
- Publish to npm registry
- Create a GitHub release
Note: The tag version (e.g., v1.0.8) must match the version in package.json (e.g., 1.0.8).
Manual Publishing
If you prefer to publish manually:
Publish to GitHub Packages
- Authenticate with GitHub Packages:
npm login --scope=@rehanqasimk --registry=https://npm.pkg.github.com- Build and publish:
npm run build
npm run publish:github
# or simply: npm publishPublish to npm Registry
- Authenticate with npm:
npm login- Build and publish:
npm run build
npm run publish:npm
# or: npm publish --registry=https://registry.npmjs.orgPublish to Both
To publish to both registries manually:
npm run build
npm run publish:github # Publish to GitHub Packages
npm run publish:npm # Publish to npm registryDevelopment
Running Locally
There are several ways to test the package locally:
Method 1: Using npm scripts (easiest)
# Build and run in one command
npm run dev
# Or build first, then run
npm run build
npm startMethod 2: Direct node execution
npm run build
node dist/index.jsMethod 3: Using npm link (test as if installed)
# Build the project
npm run build
# Create a global symlink
npm link
# Now you can run it from anywhere
happy-new-year
# Or test with npx (if you have the package linked)
npx @rehanqasimk/happy-new-year
# When done testing, unlink
npm unlink -g @rehanqasimk/happy-new-yearMethod 4: Install from local directory
# In another project or globally
npm install -g /path/to/happy-new-year
# Or in another project
npm install /path/to/happy-new-yearSetup
# Install dependencies
npm install
# Build the project
npm run buildAcknowledgments
This project uses fireworks animation frames inspired by firew0rks by Addy Osmani. The firew0rks project is a JavaScript port of text art animations and provides amazing ASCII art animations for the terminal.
Special thanks to the original creators for their work on terminal animations!
License
ISC
Author
Rehan Qasim
