Subtlyv0.1.1
Resources

Publishing & releases

Subtly is the public JavaScript package subtly, hosted in the Subtly GitHub repository with its documentation website.

Install

npm install subtly
import { createInteractions } from 'subtly';
import 'subtly/styles.css'; // optional
const interactions = createInteractions();
interactions.start();

For advanced positioning, install @floating-ui/dom separately and import subtly/floating. The main entry does not import Floating UI.

Release workflow

  1. Update the version in package.json and add release notes to CHANGELOG.md.
  2. Run npm test, npm run check, npm pack --dry-run, and the documentation validation script.
  3. For automated publication, configure npm Trusted Publisher for GitHub user afonsoocamacho, repository Subtly, workflow filename publish-npm.yml, and allow npm publish. Then run Publish npm release from the main branch in GitHub Actions. The workflow publishes with short-lived OIDC credentials and creates the matching GitHub release after npm succeeds.
  4. Alternatively, publish with npm publish from a locally authenticated machine, then create the matching GitHub release from the exact published source commit.

GitHub Actions runs tests and documentation checks. The Pages workflow regenerates and deploys docs/ when changes reach main. GitHub Pages uses GitHub Actions as its source in repository Settings > Pages.

Licensing

No license has been selected for this release. Add a license file after choosing terms for reuse.

GitHub Packages mirror

The GitHub npm registry requires scoped package names. The release workflow publishes the same source separately as @afonsoocamacho/subtly; the npmjs.org package remains the simpler subtly name. Run Publish GitHub Packages npm mirror from the repository's Actions tab to publish the current version. The first GitHub Packages publication is private by default, so change its package visibility to public in the package settings if you want others to install it.

For an authenticated GitHub Packages install, configure the scope in .npmrc:

@afonsoocamacho:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}

Then install with npm install @afonsoocamacho/subtly. Keep the npmjs.org install command as npm install subtly.

Update the website

Edit the documentation sources and push to main. GitHub Actions runs the package checks, rebuilds the static pages and deploys the site.

npm run docs:build
git add docs scripts
git commit -m "docs: update Subtly documentation"
git push

Search Subtly documentation

Popular pages
↑↓ to navigate↵ to openESC to close