Updates to Build Scripts
Updating @sygnal/code-component
https://www.npmjs.com/package/@sygnal/code-component
npm publish --access=publicUpdate: The --access=public argument is needed to make the scoped package public - otherwise it will be private by default. Instead of the command-line argument you can set access to "public" in the publishConfig section of your package.json:
"publishConfig": {
"access": "public"
}NPM Link Workflow Guide
This guide explains how to use npm link for local development of @sygnal/code-component.
What is npm link?
npm link creates a symlink from your global node_modules to your local package directory. This allows you to:
Test package changes instantly in consuming projects
Avoid publishing to npm for every small change
Develop and test simultaneously
Setup (One-time)
1. Link the package globally
In the package directory (sygnal-webflow-component):
This creates a global symlink to this package.
2. Link in your consuming project
In your project directory (e.g., sygnal-forms):
This replaces the npm-installed version with your local development version.
Daily Workflow
Making changes
Edit files in
d:\projects\sygnal-webflow-component\Test immediately in your project - changes are live!
No need to run any commands - the symlink means changes are instant
Testing changes
If something breaks
Re-link to refresh the symlink:
Publishing Workflow
When ready to publish changes:
1. Update version in package.json
2. Publish to npm
3. Update consuming projects
In your projects, you can either:
Option A: Keep using link (for active development)
Option B: Switch back to npm (for production)
Troubleshooting
"Module not found"
The link might be broken. Re-link:
"Old code is running"
Node.js might have cached the old module. Clear the require cache or restart your terminal.
"Want to switch back to npm version"
Unlink and reinstall:
Current Status
β Package linked globally: @sygnal/code-component β Linked in: sygnal-forms β Version: 0.2.0 (local development)
Benefits of npm link
β‘ Instant feedback - No build/publish cycle
π Two-way development - Work on package and project simultaneously
π§ͺ Safe testing - Test changes before publishing
π° Cost-free - No need to publish test versions to npm
Last updated