Skip to content

docs: add contribution guide - #322

Merged
smalluban merged 1 commit into
hybridsjs:mainfrom
Goldloli:contributing-guide
Oct 29, 2026
Merged

smalluban merged 1 commit into
hybridsjs:mainfrom
Goldloli:contributing-guide

Conversation

@Goldloli

Copy link
Copy Markdown
Contributor

What

Adds CONTRIBUTING.md, the how-to document requested in #284 ("The project misses a simple how-to document explaining how to contribute and work with the source code"). It covers:

  • Requirements & setup — Node.js >= 18 (from engines), npm install, and npm run test:setup (Firefox/WebKit via Playwright) plus a local Chrome for the headless Chrome run.
  • Repository layout — src/ (plain ES modules, no build step), test/spec/, test/types/, types/, cli/, docs/, and the CI workflow.
  • Commands — npm run dev (Karma watch in Chrome headless), npm run lint, npm run format, npm run test:cli, npm run test:typescript, npm run karma, npm run test:coverage, and what the full npm test runs.
  • Documentation — docsify site in docs/, navigation in _sidebar.md / _navbar.md, how to add a page; note that CHANGELOG.md is generated by standard-version.
  • Commit convention — Conventional Commits with examples from the repository history.
  • Pull request flow — branch from main, focused change + tests, run npm test, the CI Test workflow steps (npm install → npm run test:setup → npm test).
  • Release process — maintainers only: npm run release.

Why

The repository has no contributing documentation, and #284 tracks exactly that gap. Without it, new contributors have to reverse-engineer the Karma/Playwright setup (test:setup) and the individual checks from .github/workflows/test.yml.

Verification

Every command documented in the guide was executed locally on this branch:

Command Result
npm install 468 packages installed, exit 0
npm run test:cli pass 5, fail 0
npm run lint clean (no output)
npm run test:typescript clean (no output)
npm run karma -- --browsers ChromeHeadless 616 of 616 SUCCESS (47.9 s)

npm run test:setup (Playwright browser download) and the full three-browser npm test were not run locally; CI runs them exactly as documented. The Node.js 18+ requirement is taken from engines in package.json (CI uses Node 22).

Closes #284

@smalluban smalluban left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document is correct. @Goldloli thanks for the contribution.

@smalluban
smalluban merged commit 7098a9a into hybridsjs:main Oct 29, 2026
1 check passed
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 99.875%. remained the same — Goldloli:contributing-guide into hybridsjs:main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Contribution Guide document

3 participants