This package enhances Webflow's code component library deployment with clear versioning and pre-release support.
npm install --save-dev @sygnal/code-componentVideo walkthrough; https://www.loom.com/share/64d4c631a0ad48fab077adc6e7685d4f
All library names are adjusted to include the current version number, e.g. My Library becomes My Library v1.1.2.
This makes it possible to easily identify which version is installed in a workspace, and which version each site has installed.
Integration testing code component libraries means you need to deploy them into Webflow- however this is problematic for production workspaces, since it can conflict with versions you already rely on.
These deployment scripts ensure that your pre-release testing is visible and isolated from your production libraries.
- The internal name of your pre-release libraries is adjusted so that e.g. my-librarybecomesmy-library-test. This ensures that Webflow sees this as a completely distinct library, and will not replace installed components from your production library.
For visibility;
- Pre-release libraries have ⚠️ affixed, e.g.My Library v.1.1.3 ⚠️
- All components names within the library also have ⚠️ affixed
The deployment system supports three modes:
npm run deployAutomatically determines deployment mode based on your current git branch:
- Release mode: main,master, or branches starting withrelease/
- Prerelease mode: all other branches (e.g., feature/*,dev,test)
Release deployments require confirmation (can be skipped with --no-input or in CI environments).
npm run deploy-prod    # or: sygnal-deploy --releaseForces release (production) deployment regardless of branch. Requires confirmation prompt.
npm run deploy-test    # or: sygnal-deploy --prereleaseForces prerelease (test) deployment regardless of branch. No confirmation needed.
- 🔀 Branch-based config switching - Automatically uses different Webflow configs for release branches vs other branches
- 🏷️ Automatic versioning - Extracts version from your source and appends it to library name
- ⚠️ Test branch indicators - Adds warning emoji to library name AND component names on non-main branches
- 🚀 One-command deploy - Handles config switching, versioning, and Webflow upload
- 🛡️ Safe deployments - Uses temporary /deploydirectory, original source files never modified
- 🧹 Auto-cleanup - Temporary files cleaned up automatically (even on errors)
npm install --save-dev @sygnal/code-componentYour project needs only 2 files:
your-project/
├── src/
│   └── version.ts              # Export VERSION constant
├── webflow.main.json           # Production config (ONLY file needed!)
└── package.json
Example src/version.ts:
export const VERSION = "1.2.3";Example webflow.main.json:
{
  "library": {
    "name": "My Component Library",
    "components": ["./src/**/*.webflow.@(js|jsx|mjs|ts|tsx)"],
    "description": "My Component Library",
    "id": "my-library"
  }
}That's it! The script automatically generates test config from webflow.main.json:
- Appends "Test" to the library name
- Appends "-test" to the library ID
{
  "scripts": {
    "deploy": "sygnal-deploy",
    "deploy-prod": "sygnal-deploy --release",
    "deploy-test": "sygnal-deploy --prerelease"
  }
}# Webflow deployment
webflow.json
/deploy# Auto-detect based on branch
npm run deploy
# Or force specific mode
npm run deploy-prod    # Force release
npm run deploy-test    # Force prerelease- git checkout -b feature/new-featureto create pre-release branch
- Perform your development work
- Do linting locally, and local component testing where possible
- From your pre-release branch, e.g. feature/new-feature
- Deploy to Webflow as a pre-release library:
npm run deploy # Auto-detects as prerelease # or explicitly: npm run deploy-test # Forces prerelease mode 
- Test your library fully in Webflow:
- It can be safely deployed and tested alongside production versions
- The library and your components are tagged with ⚠️ for visibility in the designer nav, canvas, component panel, and quick find
 
- When ready to deploy, switch to your mainproduction branch
- Merge in your feature-branch changes git merge feature/new-feature
- Update the version number in src/version.ts, if needed
- Deploy to Webflow as a production library:
npm run deploy # Auto-detects as release, prompts for confirmation # or explicitly: npm run deploy-prod # Forces release mode, prompts for confirmation 
- Use main, notmasteras your main production branch.
- We prefer the feature/*branch naming convention for our component development. It keeps each component separate and individually testable. However this naming convention is arbitrary.
- If you have complex CMS binding for your components, you can either;
- Add both the release & pre-release libraries to your project and test the components side-by-side with the same CMS bindings for easy comparison
- Or, clone your Webflow project and use the clone for your pre-release component testing.
 
Currently code components can be installed on any project that is on a paid site plan, or within a paid workspace. So ensure at least one of those are true to support your testing strategy.
- Detects git branch → main
- Uses webflow.main.jsondirectly
- Reads version from src/version.ts
- Updates library name with version
- Deploys directly from src/files
- Result:
- Library name: "My Component Library v1.2.3"
- Library ID: "my-library"
- Component names: "Toggle", "Form Upload", etc. (clean names)
 
- Detects git branch → feature/test
- Copies src/→/deploy/src/with component names modified (adds⚠️ )
- Auto-generates test config from webflow.main.json
- Updates webflow.jsonto point to/deploy/src/**/*.webflow.*
- Reads version from src/version.ts
- Updates library name with version + warning
- Deploys from /deploydirectory
- Cleans up /deploydirectory (even on error)
- Result:
- Library name: "My Component Library Test v1.2.3 ⚠️ "
- Library ID: "my-library-test"
- Component names: "Toggle ⚠️ ", "Form Upload⚠️ ", etc. (with warnings!)
 
- Library name: "My Component Library Test v1.2.3 
- ✅ Your source files are never touched - 100% safe
- ✅ Crash-safe - Original files untouched even if script fails
- ✅ Debuggable - Can inspect /deployif something goes wrong
- ✅ No git conflicts - /deployis gitignored
sygnal-deploy --version-file src/constants/version.ts# Auto-detect based on branch
sygnal-deploy
# Force release deployment (with confirmation)
sygnal-deploy --release
# Force prerelease deployment (no confirmation)
sygnal-deploy --prerelease
# Skip confirmation prompts (for CI/CD)
sygnal-deploy --no-input
sygnal-deploy --release --no-inputThe --no-input flag is automatically enabled when CI=true environment variable is set.
You can also use the library programmatically:
const { deploy } = require('@sygnal/code-component');
deploy({
  versionFile: 'src/version.ts',
  isPrerelease: false,  // true for prerelease, false for release
  noInput: true         // skip confirmation prompts
});const {
  getCurrentBranch,
  getMainBranch,
  shouldDeployAsRelease,
  switchConfig,
  extractVersion,
  updateLibraryName,
  shareLibrary
} = require('@sygnal/code-component');
const branch = getCurrentBranch();
const mainBranch = getMainBranch();  // Auto-detects default branch
const isRelease = shouldDeployAsRelease(branch);  // Determines deployment mode
const version = extractVersion('src/version.ts');
// ... use functions individually- Node.js >= 14
- Git repository
- @webflow/webflow-cliinstalled (peer dependency)
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.