{"id":18358915,"url":"https://github.com/uppercod/check-template","last_synced_at":"2025-04-10T03:10:26.485Z","repository":{"id":113250518,"uuid":"484481508","full_name":"UpperCod/check-template","owner":"UpperCod","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-22T15:23:10.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"2-started","last_synced_at":"2024-12-23T22:27:00.217Z","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/UpperCod.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":"2022-04-22T15:23:08.000Z","updated_at":"2022-04-22T15:23:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"5644d270-9fac-4be0-a771-4f3b1a581f44","html_url":"https://github.com/UpperCod/check-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"atomicojs/base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcheck-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcheck-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcheck-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UpperCod%2Fcheck-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UpperCod","download_url":"https://codeload.github.com/UpperCod/check-template/tar.gz/refs/heads/2-started","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239036211,"owners_count":19571464,"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-05T22:19:53.996Z","updated_at":"2025-02-15T18:30:09.568Z","avatar_url":"https://github.com/UpperCod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Atomico](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/h4.svg)![Atomico](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/h3.svg)\r\n\r\n### Hi, I'm [@uppercod](https://twitter.com/uppercod), creator of Atomico and I want to thank you for starting with Atomico.\r\n\r\nIf you need help you can find it at:\r\n\r\n[![twitter](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/twitter.svg)](https://twitter.com/atomicojs)\r\n[![discord](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/discord.svg)](https://discord.gg/7z3rNhmkNE)\r\n[![documentation](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/doc-1.svg)](https://atomico.gitbook.io/doc/)\r\n[![discord](https://raw.githubusercontent.com/atomicojs/docs/master/.gitbook/assets/doc.svg)](https://webcomponents.dev/edit/collection/F7dm6YnMEDRtAl57RTXU/d6E4w07fsQbb0CelYQac)\r\n\r\nNow what you have installed is a quick start kit based on Vite, which you can scale for your project, now to continue you must execute the following commands:\r\n\r\n1. `npm install`\r\n2. `npm start` : Initialize the development server\r\n3. `npm build` : Optional, Generate a build of your project from the html file [index.html](index.html).\r\n\r\n## Workspace\r\n\r\n### Recommended structure\r\n\r\n```bash\r\nsrc\r\n  |- my-component\r\n  |  |- my-component.{js,jsx,ts,tsx}\r\n  |  |- my-component.test.js\r\n  |  |- my-component.css\r\n  |  |- README.md\r\n  |- components.js # import all components\r\n```\r\n\r\n### Add testing\r\n\r\nThe test environment is preconfigured for [vitest](https://vitest.dev/), you must complete the installation of the following devDependencies, installed the devDependencies you can execute the command `npm run test`:\r\n\r\n```bash\r\nnpm i -D vitest happy-dom\r\n```\r\n\r\nYou can learn more about the Atomico test api in the [test documentation](https://atomico.gitbook.io/doc/api/testing).\r\n\r\n#### Test example\r\n\r\n```tsx\r\nimport { describe, it, expect } from \"vitest\";\r\nimport { fixture } from \"atomico/test-dom\";\r\nimport { MyComponent } from \"./my-component\";\r\n\r\ndescribe(\"MyComponent\", () =\u003e {\r\n  it(\"default properties\", () =\u003e {\r\n    const node = fixture(\u003cMyComponent /\u003e);\r\n\r\n    expect(node.myProp).toEqual(\"value\");\r\n  });\r\n\r\n  it(\"Check DOM\", async () =\u003e {\r\n    const node = fixture(\u003cMyComponent /\u003e);\r\n\r\n    node.showInput = true;\r\n\r\n    await node.updated; // or updated\r\n\r\n    expect(node.shadowRoot.querySelector(\"input\")).toBeInstanceOf(\r\n      HTMLInputElement\r\n    );\r\n  });\r\n});\r\n```\r\n\r\n\u003e `@web/test-runner` supports asynchrony, coverage, [viewport and more](https://modern-web.dev/docs/test-runner/commands/).\r\n\r\n### NPM export\r\n\r\nAtomico owns the [@atomico/exports](https://atomico.gitbook.io/doc/atomico/atomico-exports) tool that simplifies the generation of builds, types and exports by distributing webcomponents in NPM, you must complete the installation of the following devDependencies, installed the devDependencies you can execute the command `npm run exports`:\r\n\r\n```bash\r\nnpm install -D @atomico/exports\r\n```\r\n\r\n### Postcss\r\n\r\nThis configuration already depends on Postcss, you can more plugins through `package.json#postcss`, example:\r\n\r\n```json\r\n\"postcss\": {\r\n  \"plugins\": {\r\n    \"postcss-import\": {}\r\n  }\r\n}\r\n```\r\n\r\n\u003e In case of build, Atomico will minify the CSS code.\r\n\r\n### Github page\r\n\r\nAdd to `package.json#scripts.build`:\r\n\r\n```bash\r\n--outDir docs # modify the destination directory\r\n--base my-repo # github page folder\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fcheck-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuppercod%2Fcheck-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuppercod%2Fcheck-template/lists"}