maksit-webui/assets/docs/NPM_PUBLISH.md
2026-05-24 20:48:35 +02:00

2.8 KiB

Publishing @maks-it.com/webui-* to npm

Packages are published under the @maks-it.com scope to registry.npmjs.org, managed from the maks-it.com npm org.

Published packages:

Package npm
@maks-it.com/webui-contracts https://www.npmjs.com/package/@maks-it.com/webui-contracts
@maks-it.com/webui-core https://www.npmjs.com/package/@maks-it.com/webui-core
@maks-it.com/webui-components https://www.npmjs.com/package/@maks-it.com/webui-components

One-time npm setup

  1. Sign in at https://www.npmjs.com/ with the maks-it.com org account.
  2. Confirm the @maks-it.com scope exists under Packages. The org name maks-it.com is the npm scope for scoped packages.
  3. Create an Automation token (recommended) or Granular Access token with Publish on @maks-it.com/*:
  4. Store the token for release tooling:
    • CI / Release-Package: set env var NPMJS_MAKS_IT to the token value (same pattern as NUGET_MAKS_IT).
    • Local one-off publish: npm login or a user-level ~/.npmrc entry:
      //registry.npmjs.org/:_authToken=YOUR_TOKEN
      

Scoped packages must use --access public (already configured in each package publishConfig).

Manual first publish (0.1.0)

From the repo root:

cd src
npm ci
npm run build
npm publish -w @maks-it.com/webui-contracts --access public
npm publish -w @maks-it.com/webui-core --access public
npm publish -w @maks-it.com/webui-components --access public

Order matters: contracts → core → components.

Verify:

npm view @maks-it.com/webui-contracts version
npm view @maks-it.com/webui-core version
npm view @maks-it.com/webui-components version

Use utils/Release-Package/Release-Package.bat (or pwsh utils/Release-Package/Release-Package.ps1):

  1. Bump version in src/package.json (or tag drives NpmReleaseVersion).
  2. Tag HEAD with exact semver, e.g. git tag v0.2.0 && git push origin v0.2.0.
  3. Set NPMJS_MAKS_IT and run the release engine.

utils/Release-Package/scriptsettings.json runs NpmReleaseVersion, NpmBuild, ReleasePublishGuard, optional GitHub, then NpmPublish in dependency order.

After publish — Certs UI / Vault

In each WebUI app (MaksIT.WebUI/package.json):

"@maks-it.com/webui-contracts": "^0.1.0",
"@maks-it.com/webui-core": "^0.1.0",
"@maks-it.com/webui-components": "^0.1.0"

Then refresh the lockfile:

cd src/MaksIT.WebUI
npm install

Docker builds use npm ci from the lockfile; no sibling maksit-webui clone is required in the image context.