# Contributing The repository is released under the MIT license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into main. ## Requirements * Node.js `^22.22.2 || ^24.15.0 || >=26.0.0`, the same range as `engines` in `package.json` (CI runs the test matrix on 22 and 24). The devDependency floor is what drives this range: Stylelint and jsdom require the newer patches. * npm 10+ ## Development ```shell $ npm install $ npm run dev # Vite dev server, opens index.html $ npm run type-check # tsc --noEmit over src, __test__, demo, tasks and the configs $ npm run lint # ESLint (flat config, @antfu/eslint-config) $ npm run lint:style # Stylelint for src/**/*.{css,scss} $ npm test # Vitest $ npm run package # build dist/ and assemble .release/ ``` `index.html` is the only page: it loads `demo/main.ts`, which imports `src/` directly, so the dev server and the GitHub Pages demo share one page. The demo assets (`chart1.jpg`, `chart2.jpg`, `footerInput.jpg`, `msg.mp3`, `favicon.ico`) live in `public/`, which Vite serves at the root and copies into `.publish` for `build:deployment`. ## TypeScript specifics * `tsconfig.json` type-checks everything (`noEmit`) and is the config the CI `type-check` step uses. `tsconfig.build.json` is the declaration-only config that writes `dist/*.d.ts` during the build. * `tasks/*.ts` are executed by Node's built-in type stripping, so they may only use syntax that can be erased: no `enum`, `namespace` or constructor parameter properties. `erasableSyntaxOnly` enforces this during `type-check`. * `release.config.js` stays JavaScript on purpose: semantic-release loads it through cosmiconfig, whose TypeScript loader resolves `typescript` from semantic-release's own install tree (inside the action) rather than from this project. * `src/types/*.d.ts` holds the ambient declarations for CSS Modules, for the two `@cycjimmy/awesome-js-funcs` entry points (the package ships no types) and for Swiper's stylesheet, which only the demo imports. * `index.d.ts` is deliberately self-contained: the shared item types live in `src/index.ts` so the published entry point does not import `containerTemplate`. ## Build outputs `npm run build` writes these files into `dist/`: | File | Format | Purpose | | --- | --- | --- | | `simulate-chatting.esm.js` | ESM | `main`, `module` and `exports` entry (bundlers, `import`) | | `simulate-chatting.umd.js` | UMD | unminified browser build for `