{"id":21754648,"url":"https://github.com/aegisjsproject/template","last_synced_at":"2026-04-09T20:40:19.871Z","repository":{"id":220931144,"uuid":"752897110","full_name":"AegisJSProject/template","owner":"AegisJSProject","description":"Template repository for `@aegisjsproject/component` component","archived":false,"fork":false,"pushed_at":"2025-06-23T16:17:12.000Z","size":985,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T16:37:59.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AegisJSProject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"shgysk8zer0","liberapay":"shgysk8zer0"}},"created_at":"2024-02-05T03:53:29.000Z","updated_at":"2025-06-23T16:17:16.000Z","dependencies_parsed_at":"2024-02-05T09:02:15.366Z","dependency_job_id":"c0a4f565-bc6e-4770-be76-ccb4e08a3935","html_url":"https://github.com/AegisJSProject/template","commit_stats":null,"previous_names":["shgysk8zer0/aegis-component-template","aegisjsproject/template"],"tags_count":5,"template":true,"template_full_name":"shgysk8zer0/npm-template","purl":"pkg:github/AegisJSProject/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AegisJSProject%2Ftemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AegisJSProject%2Ftemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AegisJSProject%2Ftemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AegisJSProject%2Ftemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AegisJSProject","download_url":"https://codeload.github.com/AegisJSProject/template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AegisJSProject%2Ftemplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261832617,"owners_count":23216494,"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-26T09:14:35.972Z","updated_at":"2026-04-09T20:40:14.843Z","avatar_url":"https://github.com/AegisJSProject.png","language":"JavaScript","funding_links":["https://github.com/sponsors/shgysk8zer0","https://liberapay.com/shgysk8zer0","https://liberapay.com/shgysk8zer0/donate"],"categories":[],"sub_categories":[],"readme":"# `@aegisjsproject/template`\n\nTemplate repository for [`@aegisjsproject/component`](https://github.com/AegisJSProject/component) components\n\n[![CodeQL](https://@github.com/AegisJSProject/template/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shgysk8zer0/npm-template/actions/workflows/codeql-analysis.yml)\n![Node CI](https://@github.com/AegisJSProject/template/workflows/Node%20CI/badge.svg)\n![Lint Code Base](https://@github.com/AegisJSProject/template/workflows/Lint%20Code%20Base/badge.svg)\n\n[![GitHub license](https://img.shields.io/github/license/AegisJSProject/template.svg)](https://@github.com/AegisJSProject/template/blob/master/LICENSE)\n[![GitHub last commit](https://img.shields.io/github/last-commit/AegisJSProject/template.svg)](https://@github.com/AegisJSProject/template/commits/master)\n[![GitHub release](https://img.shields.io/github/release/AegisJSProject/template?logo=github)](https://@github.com/AegisJSProject/template/releases)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/shgysk8zer0?logo=github)](https://github.com/sponsors/shgysk8zer0)\n\n[![npm](https://img.shields.io/npm/v/@aegisjsproject/template)](https://www.npmjs.com/package/@aegisjsproject/template)\n![node-current](https://img.shields.io/node/v/@aegisjsproject/template)\n![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40aegisjsproject%template)\n[![npm](https://img.shields.io/npm/dw/@aegisjsproject/npm-template?logo=npm)](https://www.npmjs.com/package/@aegisjsproject/template)\n\n[![GitHub followers](https://img.shields.io/github/followers/AegisJSProject.svg?style=social)](https://github.com/AegisJSProoject)\n![GitHub forks](https://img.shields.io/github/forks/AegisJSProject/template.svg?style=social)\n![GitHub stars](https://img.shields.io/github/stars/AegisJSProject/template.svg?style=social)\n[![Twitter Follow](https://img.shields.io/twitter/follow/shgysk8zer0.svg?style=social)](https://twitter.com/shgysk8zer0)\n\n[![Donate using Liberapay](https://img.shields.io/liberapay/receives/shgysk8zer0.svg?logo=liberapay)](https://liberapay.com/shgysk8zer0/donate \"Donate using Liberapay\")\n- - -\n\n- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)\n- [Contributing](./.github/CONTRIBUTING.md)\n\u003c!-- - [Security Policy](./.github/SECURITY.md) --\u003e\n\nThis is a [GitHub Template Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository)\nto create components using [`@aegisjsproject/component`](https://npmjs.com/package/@aegisjsproject/component).\nIt serves as a quick-start to creating light-weight, secure, web standards based \ncomponents. It provides the essentials, such as:\n\n- The essential packages:\n  - [`@aegisjsproject/core`](https://github.com/AegisJSProject/aegis)\n  - [`@aegisjsproject/styles`](https://github.com/AegisJSProject/styles)\n  - [`@aegisjsproject/component`](https://github.com/AegisJSProject/component)\n- Build tools\n  - [eslint](https://npmjs.com/eslint)\n  - [rollup](https://npmjs.com/rollup)\n- [Dependabot](https://github.com/dependabot) \u0026 [CodeQL](https://github.com/github/codeql) config\n- Pull Request \u0026 Issue templates\n- Automated releases to npm on `git tag` (when pushed using `git push --tags`)\n- Provides GitHub Action for Package Provenance\n\nTo start creating your own component, just go to the [GitHub repo](https://@github.com/AegisJSProject/template)\nand click the \"Use this template\" button.\n\n## Steps to Create a Component\n\n- Create Repository from the GitHub Template Repository\n- Clone your new Aegis Component Repository\n- Update the `README.md`, `package.json`, \u0026 `CHANGELOG.md` as needed (especially the name)\n- Create your component\n- Update `rollup.config.js` (don't forget to update `input` \u0026 `output.file`)\n- Publish (create and merge PR)\n\n## Using Automated Releases\n\nThe following  setup will create an automated GitHub Release and publish on npm\nfor every signed git tag (`git tag -s vx.y.z`) pushed to GitHub:\n\n- Create a \"Classic Token\" (Automation) on [npmjs.org](https://www.npmjs.com/)\n- Give that token a descriptive name name and copy it\n- Paste it into your repository's \"Repository secrets\" in \"settings\" -\u003e \"Secrets and variables\" -\u003e Actions\n- Done!\n\nNow, every time you create a new PGP signed tag on GitHub (don't forget to `git push --tags`)\nit will create a new GitHub Release and a new release on npm with Package Provenance.\n\n## Example Component:\n\n```js\nimport { AegisComponent, SYMBOLS, TRIGGERS } from '@aegisjsproject/component';\nimport { html, appendTo } from '@aegisjsproject/core';\n\nclass HTMLHelloWorldElement extends AegisComponent {\n  async [SYMBOLS.render](type, { shadow }) {\n    switch(type) {\n      case TRIGGERS.constructed:\n        appendTo(shadow, html`\u003ch1\u003eHello, World!\u003c/h1\u003e`);\n        break;\n    }\n  }\n}\n\nHTMLHelloWorldElement.register('hello-world');\n```\n\n## Package, Component, \u0026 Repository Requirements\n\nAll packages **MUST** adhere to strict but fairly easy security guidelines:\n\n- All commits and tags **MUST** be [PGP/GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)\n- All web-based commits **MUST** be signed off by the contributor (a setting in GitHub repo settings)\n- All releases **MUST** use [Package Provenance](https://github.blog/2023-04-19-introducing-npm-package-provenance/)\n- Components **MUST** adhere to a strict [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy)\n- Components **MUST** comply with the provided [`TrustedTypesPolicy`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy) or add their own, which **SHOULD**:\n  - Use `:component-name#html` for writing HTML as a string\n  - Use `:component-name#script-url`\n- Components **MUST** be `import`able from a CDN (such as `unpkg.com`) without any build step/bundler\n- Component **SHOULD** provide a `\u003cscript type=\"importmap\"\u003e` or `importmap.json` as necessary\n- Components **MUST NOT** use inline scripts (`script-src 'unsafe-inline`) or styles (`style-src 'unsafe-inline'`)\n- Components **MUST NOT** use `element.innerHTML` or similar\n- Components **MUST NOT** use `eval()` or `onclick` or anything similar\n- Components using [life cycle callbacks](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#using_the_lifecycle_callbacks) **MUST** have a `[Symbol.for('aegis:render')]` method\n\n## Content-Security-Policy\n\nThis is the base CSP (with comments):\n\n```\ndefault-src 'none'; // Block everything by default\nstyle-src 'self' blob:; // `blob:` essential for constructable stylesheet polyfill\nscript-src 'self' https://unpkg.com/@aegisjsproject/; // Your script source may/should be added\nconnect-src 'self'; // Add any data sources as needed, but as specific as possible\ntrusted-types emtpy#html mepty#script sanitizer-raw#html; // Add to as necessary\nrequire-trusted-types-for 'script'; // This is required and currently the only option\n```\n\nComponents **MAY** differ from this in requiring additional `script-src` (other\nthan `unnsafe-inline`, `unsafe-eval`, and additional `nonce-*` or `sha*` hashes\n(URL only permitted). Components **MAY** add to the `trusted-types`, if necessary,\nsuch as to add additional [`policy.createScriptURL()`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy/createScript)s\nas essential. Any such policy created for script URLs (namely, `\u003ciframe\u003e`s)\n**SHOULD** be of the form `:component-name#script-url`.\n\nComponents **SHOULD NOT** utilize methods or setters (such as `innerHTML`) which\nwrite HTML as strings and would require [`policy.createHTML()`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy/createHTML).\nComponents **MAY** use the text alternatives, such as `textContent`. However,\n should the component require such things, the component **MUST** create an\nadditional `TrsutedTypePolicy`, which **SHOULD** be named as `:component-name#html`:\n\nComponents **SHOULD NOT** include any [`policy.createScript()`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy/createScript)\nunless absolutely essential, as this would violate the strict CSP requirement and\nrestriction from using `unsafe-*` in `script-src`. However, should your component\nabsolutely and justifiably require this, it **SHOULD** use a `TrustedTypes` Policy\nname of the form `:component-name#script`.\n\nAny component which requires more than one of `createHTML()`, `createScriptURL()`,\nor `createScript()` **MAY** instead combine the above simple into a single policy,\nwhich **SHOULD** be named `:component-name`.\n\nComponents **MUST** explicitly list any necessary changes to their CSP (including)\n`TrustedTypes` in their README.\n\nTo be listed in the upcoming Aegis component registry, components **MUST NOT**\nimplement their own `createHTML()` (`:component-name#html`) or `createScript()`\n(`component-name#script`) methods, but **MAY** implement a `createScriptURL()`\n(`:component-name#script-url`) method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegisjsproject%2Ftemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faegisjsproject%2Ftemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegisjsproject%2Ftemplate/lists"}