{"id":16346997,"url":"https://github.com/ospoon/web-component-development","last_synced_at":"2025-06-24T01:02:05.843Z","repository":{"id":190319398,"uuid":"667355577","full_name":"OSpoon/web-component-development","owner":"OSpoon","description":"基于 Quarkc 跨端组件开发（批量构建模式）","archived":false,"fork":false,"pushed_at":"2025-04-24T07:31:20.000Z","size":1533,"stargazers_count":4,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T08:34:50.388Z","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/OSpoon.png","metadata":{"files":{"readme":"README.es-US.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-07-17T10:13:25.000Z","updated_at":"2025-04-24T07:31:24.000Z","dependencies_parsed_at":"2023-09-11T03:05:00.935Z","dependency_job_id":"bd7cab86-54b8-424b-baed-7ee7ac1a9a84","html_url":"https://github.com/OSpoon/web-component-development","commit_stats":null,"previous_names":["ospoon/cross-platform-components","ospoon/quarkc-component-development"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/OSpoon/web-component-development","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Fweb-component-development","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Fweb-component-development/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Fweb-component-development/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Fweb-component-development/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSpoon","download_url":"https://codeload.github.com/OSpoon/web-component-development/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSpoon%2Fweb-component-development/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261583773,"owners_count":23180667,"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-10-11T00:39:05.659Z","updated_at":"2025-06-24T01:02:05.810Z","avatar_url":"https://github.com/OSpoon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Developing Cross-Platform Components Based on Quarkc\n\nWith this project, you can create a series of cross-technology stack/frameworkless components of your own.\n\n[中文](./README.md) | English\n\n## Changes\n\nChanges made to `template-quarkc-component-ts` include:\n| Number | Description |\n| ------ | ---------------------------- |\n| 1 | Adjusted `npm run build` to batch build |\n| 2 | Added `npm run new` to create components |\n| 3 | [Add `unocss` atomic CSS configuration.](https://github.com/OSpoon/web-component-development/tree/unocss/README.md) |\n| 4 | Replace the test suite with `@web/test-runnner` |\n| 5 | Tuning unit tests directly import component source code |\n\n## Initialization\n\n```\nnpm install\nnpm run dev\n```\n\n## 1. Generating Components\n\nGenerate a component named MyComponent\n\n```\n$ npm run new\n\u003e web-component-development@0.0.1 new\n\u003e plop\n? component name please : my-component\n✔  ++ /components/MyComponent/index.tsx\n✔  ++ /components/MyComponent/index.less\n✔  ++ /components/MyComponent/vite-env.d.ts\n```\n\n## 2. Using Components\n\n```html\n\u003chead\u003e\n  \u003c!-- ① Import component --\u003e\n  \u003cscript type=\"module\" src=\"./components/MyComponent/index.tsx\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003c!-- ② Use component --\u003e\n  \u003cmy-component text=\"Made for cross-technology stack purposes!\"\u003e\u003c/my-component\u003e\n\u003c/body\u003e\n```\n\n## 3. Packaging\n\n```\nnpm run build\n```\n\nThe output after packaging is: `dist/\u003ccomponent name\u003e/index.js` and `dist/\u003ccomponent name\u003e/index.umd.js`.\n\n```tree\n.\n├── types\n|     └── index.d.ts\n├── index.js\n├── index.umd.js\n└── package.json\n```\n\n## 4. Verifying Output\n\nAdjust the component path to the packaged output path\n\n```html\n\u003chead\u003e\n  \u003c!-- ① Import component --\u003e\n  \u003cscript type=\"module\" src=\"./dist/MyComponent/index.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003c!-- ② Use component --\u003e\n  \u003cmy-component text=\"Made for cross-technology stack purposes!\"\u003e\u003c/my-component\u003e\n\u003c/body\u003e\n```\n\n```html\n\u003chead\u003e\n  \u003c!-- ① Import component --\u003e\n  \u003cscript type=\"module\" src=\"./dist/MyComponent/index.umd.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003c!-- ② Use component --\u003e\n  \u003cmy-component text=\"Made for cross-technology stack purposes!\"\u003e\u003c/my-component\u003e\n\u003c/body\u003e\n```\n\nFor detailed documentation, please visit: https://quark-ecosystem.github.io/quarkc-docs/#/en-US/docs/publishing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fospoon%2Fweb-component-development","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fospoon%2Fweb-component-development","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fospoon%2Fweb-component-development/lists"}