{"id":20181797,"url":"https://github.com/nichoth/template-ts-preact-htm","last_synced_at":"2025-03-03T06:12:35.702Z","repository":{"id":203824306,"uuid":"710470889","full_name":"nichoth/template-ts-preact-htm","owner":"nichoth","description":"Template for peact, htm, and typescript","archived":false,"fork":false,"pushed_at":"2025-02-25T17:07:29.000Z","size":518,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T18:23:09.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nichoth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-26T19:00:22.000Z","updated_at":"2025-02-25T17:07:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"0df428cd-7e53-46e2-ad2a-edaa3cd21442","html_url":"https://github.com/nichoth/template-ts-preact-htm","commit_stats":null,"previous_names":["nichoth/template-ts-preact-htm"],"tags_count":0,"template":true,"template_full_name":"nichoth/template-ts-browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Ftemplate-ts-preact-htm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Ftemplate-ts-preact-htm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Ftemplate-ts-preact-htm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Ftemplate-ts-preact-htm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichoth","download_url":"https://codeload.github.com/nichoth/template-ts-preact-htm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241616696,"owners_count":19991543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T02:36:46.623Z","updated_at":"2025-03-03T06:12:35.682Z","avatar_url":"https://github.com/nichoth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# template ts preact htm ![tests](https://github.com/nichoth/template-ts-preact-htm/actions/workflows/nodejs.yml/badge.svg)\n\nA template for *dependency* modules using `preact`, `htm`, and typescript. Uses `tape-run` for tests in a browser environment. See [template-ts](https://github.com/nichoth/template-ts) for something similar but targeting Node.\n\n## more templates\n[See the list](https://github.com/nichoth/#templates) for more options.\n\n## use\n1. Use the template button in github. Or clone this then `rm -rf .git \u0026\u0026 git init`. Then `npm i \u0026\u0026 npm init`.\n\n2. Edit the source code in `src/index.ts`.\n\n## featuring\n\n* compile the source to both ESM and CJS format, and put compiled files in `dist`.\n* ignore `dist` and `*.js` in git, but don't ignore them in npm. That way we don't commit any compiled code to git, but it is available to consumers.\n* use npm's `prepublishOnly` hook to compile the code before publishing to npm.\n* use `exports` field in `package.json` to make sure the right format is used by consumers.\n* `preversion` npm hook -- lint via `standardx`.\n* `postversion` npm hook -- `git push \u0026\u0026 git push --tags \u0026\u0026 npm publish`\n* eslint via [standardx](https://www.npmjs.com/package/standardx) -- `npm run lint`\n* tests run in a browser environment via `tape-run` -- see `npm test`. Includes `tap` testing tools -- [tapzero](https://github.com/nichoth/tapzero) and [tap-arc](https://www.npmjs.com/package/tap-arc)\n* CI via github actions\n* Deploy a demo webpage on any push event to the main branch. This will build the `example` directory and deploy it to your `github.io` site.\n\n## changelog\nWe automatically create a changelog from the commit messages, at `./CHANGELOG`.  Commit messages should contain the text \"BREAKING CHANGE\" for breaking changes.\n\nThis happens automatically via the [npm version script](./package.json#L15).\n\n## demo\nUse [a link like this](https://nichoth.github.io/template-ts-preact-htm/) to see a demo page, built from the `example` directory.\n\nThis means you need to configure some things in github to make github pages work. In the gihub UI, you need to go to `settings` \u003e `Pages`, and choose `Github Actions` in the `Build and Deployment` source.\n\n![Screenshot of github UI](image.png)\n\nAlso you should go `settings` \u003e `Environments`, and create an environemnt `gh-pages`.\n\n![Screenshot of github UI for environments](image-1.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Ftemplate-ts-preact-htm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichoth%2Ftemplate-ts-preact-htm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Ftemplate-ts-preact-htm/lists"}