We maintain custom npm registry: https://npm.cxl.co and publish there Aybolit packages.
It is important to check if there's .npmrc
file on main Aybolit directory with following entry:
@conversionxl:registry=https://npm.cxl.co
In order to publish packages you need to log in to npm registry.
npm login --registry=https://npm.cxl.co
Run following commands in main repository directory:
yarn
yarn build
yarn dist
Important: before performing following steps make sure your workdir is clean and contains only necessary files and directories. Clean it up from everyting else as publish everything sitting in the package directory.
In following steps cxl-ui
package is used but you can replace it with name of the other package.
cd packages/cxl-ui
- Edit package version in
package.json
.
- "version": "1.1.0-alpha.2",
+ "version": "1.1.0-alpha.3",
- Save and commit it.
yarn publish
- Go through all steps. When asked about version, use value you just placed in
package.json
eg.1.1.0-alpha.3
- Done.
It's possible to use following options:
--registry <url> // override configuration registry
--new-version [version] // new version
--tag [tag] // tag
More: yarn --help
Package versions can be tagged, eg. cxl-ui
has playbooks
tag.
When you publish, simply add --tag tagname
param to the publish command.
If you want tag to point always to latest version of specific branch (?) (eg. playbooks
) you need remove tag first and then tag latest release.
npm dist-tag rm <pkg> <tag> --registry=https://npm.cxl.co
- eg.
npm dist-tag rm @conversionxl/cxl-ui playbooks --registry=https://npm.cxl.co
npm dist-tag add <pkg>@<version> [<tag>] --registry=https://npm.cxl.co
- eg.
npm dist-tag add @conversionxl/[email protected] playbooks --registry=https://npm.cxl.co
More:
Important: for some reason http://npm.cxl.co does not show tag updates immediately. If you want to check status of tags use npm dist-tag
.
- every package has to be published separately (
cxl-ui
,cxl-lumo-styles
, ...), - we keep versions of the packages in sync, even if changes are introduced to only one of them.
This operation is not recommended. Be careful before publishing packages. In case of making a mistake (we're all humans) it's easier to publish a new version then unpublishing.
Once a package is published, you can never modify that specific version, so take care before publishing.
If you want to remove a single version of a package, you can unpublish one version without affecting the others. This will delete only that version from the registry and it will be unable to be installed. This option is only available via the npm CLI.
Once a package is unpublished, republishing under the same name is blocked for 24 hours.