sql-editor-component
v1.0.17
Published
This document describes:
Readme
NPM Package – Usage Guide
This document describes:
- How to run this NPM package locally
- How to publish the package and release a new version
1. Running the NPM package locally
1.1. Requirements
- Node.js (LTS recommended)
- npm (comes bundled with Node.js)
- Access to this package repository
Check versions:
node -v
npm -v1.2. Install dependencies
Install dependencies:
npm install1.3. Run locally (development)
If the package exposes a dev script:
npm run dev1.4. Use the local package in another project (npm link)
To test this package inside another local project:
Inside the package directory:
npm linkInside the consuming project:
npm link sql-editor-componentThe project will now use the local version of the package.
💡 Hint To verify that the consuming project is actually using the local version of
sql-editor-component, run:npm ls sql-editor-component
To unlink:
npm unlink sql-editor-component1.5. Propagate changes to the consuming project (build)
Each time you make changes to the sql-editor-component package, you must rebuild it so the changes are reflected in the consuming project (because the linked files come from dist):
npm run buildThis will also perform TypeScript checks.
For faster development (without type checks), you can run a Vite-only build:
npm run vite-buildRelevant fields in package.json:
{
"main": "./dist/sql-editor-component.umd.js",
"module": "./dist/sql-editor-component.es.js"
}2. Publishing the NPM package and releasing a new version
2.1. Login to npm
npm loginVerify login:
npm whoami2.2. Update the package version
Versions are managed via Semantic Versioning:
patch– bug fixes (1.0.0 → 1.0.1)minor– backward-compatible features (1.0.0 → 1.1.0)major– breaking changes (1.0.0 → 2.0.0)
Examples:
npm version patch
npm version minor
npm version majorThis will:
- update the version in
package.json - create a git commit and tag
Push changes and tags:
git push && git push --tags2.3. Publish to npm
Publish a new version:
npm publishIf this is a scoped package and should be public:
npm publish --access public2.4. Verify publication
After publishing, verify the package:
npm view sql-editor-componentOr install it in a new project:
npm install sql-editor-component