A complete guide to making changes to the scripts package and deploying to production.
# Start from the repo root
cd /path/to/webflow-university
# Make sure you're on main and up to date
git checkout main
git pull origin main
# Create a feature branch
git checkout -b feat/add-new-featureNow edit your files in packages/scripts/src/:
# Build the scripts package
pnpm build:scripts
# Or run in dev mode (with live reload)
pnpm dev:scripts
# This will serve files at http://localhost:3000
# You can test them in your browser or Webflow siteVerify your changes work:
- Check the built output in
packages/scripts/dist/ - Test in your local environment
- Make sure there are no TypeScript errors:
pnpm check
# Check for linting issues
pnpm lint
# Auto-fix what you can
pnpm lint:fix
# Format code
pnpm format
# Type check
pnpm checkThis tells the system what version bump is needed:
pnpm changesetYou'll be prompted:
- Which packages changed? → Select
scripts(use space to select, enter to confirm) - What kind of change? → Choose:
major- Breaking changes (2.0.0 → 3.0.0)minor- New features (2.0.0 → 2.1.0)patch- Bug fixes (2.0.0 → 2.0.1)
- Write a summary → Describe what changed
This creates a file in .changeset/ like:
.changeset/brave-lions-sleep.md
# Stage your changes
git add .
# Commit with a descriptive message
git commit -m "feat: add new feature to scripts"
# Push to your branch
git push origin feat/add-new-feature- Go to GitHub and create a PR from your branch to
main - Fill out the PR template
- The CI workflow will automatically:
- Run linting
- Type check
- Build all packages
- Wait for CI to pass ✅
- Get your PR reviewed
- Address any feedback
- Once approved, merge to
main
After merging to main:
-
GitHub Actions automatically:
- Builds the packages
- Commits the
dist/folder - Creates a new PR called "chore: version packages"
- This PR will:
- Update
packages/scripts/package.jsonversion (e.g., 1.0.0 → 1.0.1) - Update CHANGELOG.md
- Include your changeset summary
- Update
-
Review the version PR:
- Check that the version bump is correct
- Verify the changelog looks good
- Make sure
dist/folder changes are included
-
Merge the version PR:
- This triggers the release workflow
When you merge the version PR:
-
GitHub Actions automatically:
- Builds the scripts package
- Creates a git tag (e.g.,
v1.0.1) - Creates a GitHub Release
- Pushes the tag to GitHub
-
The release includes:
- Version number
- jsdelivr URLs for the new version
- Changelog summary
Your scripts are now available via jsdelivr!
Option A: Use the new version tag
<script
defer
src="https://cdn.jsdelivr.net/gh/webflow/webflow-university@v1.0.1/packages/scripts/dist/index.js"
></script>Option B: Use major version (auto-updates)
If you're already using @1 and this was a patch/minor:
<!-- This will automatically get the new version -->
<script
defer
src="https://cdn.jsdelivr.net/gh/webflow/webflow-university@1/packages/scripts/dist/index.js"
></script>Option C: Update your Webflow site
- Go to your Webflow site settings
- Update the script tag URL to the new version
- Publish your site
# Check deployment info
node scripts/deploy-info.js
# Or test the URL directly
curl https://cdn.jsdelivr.net/gh/webflow/webflow-university@v1.0.1/packages/scripts/dist/index.js# Development
pnpm dev:scripts # Dev mode with live reload
pnpm build:scripts # Build for production
pnpm lint # Check for issues
pnpm check # Type check
# Versioning
pnpm changeset # Create a changeset
pnpm changeset:version # Version packages (usually automatic)
# Deployment info
node scripts/deploy-info.js # Show current deployment URLs- Patch (1.0.0 → 1.0.1): Bug fixes, small improvements
- Minor (1.0.0 → 1.1.0): New features, backward compatible
- Major (1.0.0 → 2.0.0): Breaking changes
- Make change → 5-30 minutes
- Test locally → 5-15 minutes
- Create PR → 2 minutes
- CI runs → 2-5 minutes
- Review & merge → Depends on team
- Version PR created → Automatic, ~2 minutes
- Merge version PR → 1 minute
- Release created → Automatic, ~2 minutes
- jsdelivr available → Immediate (or within minutes)
Total time: Usually 15-30 minutes from merge to production (excluding review time)
# Fix linting issues
pnpm lint:fix
# Fix type errors
pnpm check
# Rebuild
pnpm build- Check that you created a changeset
- Verify the changeset file exists in
.changeset/ - Check GitHub Actions logs
- jsdelivr caches files (usually clears within minutes)
- Use a specific version tag instead of branch name
- Check the tag exists:
git tag
- The workflow should handle this automatically
- If needed, manually:
git add packages/scripts/dist/ && git commit -m "chore: build"
# 1. Start
git checkout main
git pull
git checkout -b fix/calendar-bug
# 2. Make change
# Edit packages/scripts/src/index.ts
# 3. Test
pnpm build:scripts
pnpm check
# 4. Create changeset
pnpm changeset
# Select: scripts, patch, "Fix calendar date calculation bug"
# 5. Commit
git add .
git commit -m "fix: correct calendar date calculation"
git push origin fix/calendar-bug
# 6. Create PR on GitHub, wait for review
# 7. After merge, version PR is created automatically
# Review and merge it
# 8. Release is created automatically
# Your fix is now at:
# https://cdn.jsdelivr.net/gh/webflow/webflow-university@v1.0.1/packages/scripts/dist/index.js