{"id":25330783,"url":"https://github.com/beyondjs/svelte-bundler","last_synced_at":"2025-08-16T10:45:32.843Z","repository":{"id":244810578,"uuid":"814591309","full_name":"beyondjs/svelte-bundler","owner":"beyondjs","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-24T19:52:52.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-24T20:35:35.411Z","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/beyondjs.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":"2024-06-13T10:00:17.000Z","updated_at":"2025-05-24T19:52:55.000Z","dependencies_parsed_at":"2024-12-16T01:29:03.311Z","dependency_job_id":null,"html_url":"https://github.com/beyondjs/svelte-bundler","commit_stats":null,"previous_names":["beyondjs/svelte-processor","beyondjs/svelte-bundler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beyondjs/svelte-bundler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fsvelte-bundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fsvelte-bundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fsvelte-bundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fsvelte-bundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/svelte-bundler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fsvelte-bundler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270702470,"owners_count":24630873,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-14T03:33:45.412Z","updated_at":"2025-08-16T10:45:32.806Z","avatar_url":"https://github.com/beyondjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeyondJS Processor for Svelte\n\n## Introduction\n\nBeyondJS is an innovative JavaScript framework designed to streamline development across various environments like\nbrowsers, Node.js, Deno, and Bun. A key component of BeyondJS is its processor system, which efficiently manages\nJavaScript modules and packages. When working with Svelte, BeyondJS provides specific processors to handle Svelte files\nseamlessly.\n\n## What is a BeyondJS Processor?\n\nA BeyondJS processor is a tool used to handle specific types of files within a project. For Svelte projects, the Svelte\nprocessor compiles and bundles Svelte components, ensuring that they integrate smoothly with the rest of the\napplication.\n\n## Setting Up BeyondJS Processor for Svelte\n\n### Creating a Svelte Module\n\nTo create a new Svelte module in BeyondJS, you need to create a folder for your module and add a `module.json` file to\nconfigure the Svelte processor.\n\n### Example `module.json` Configuration\n\n```json\n{\n\t\"bundles\": {\n\t\t\"js\": { \"processor\": \"svelte\" },\n\t\t\"css\": { \"processor\": \"sass\" }\n\t}\n}\n```\n\nIn this configuration:\n\n-   The `js` bundle is processed using the Svelte processor.\n-   The `css` bundle is processed using the SASS processor.\n\n### Example Directory Structure\n\n```\nmy-svelte-module/\n├── src/\n│   ├── App.svelte\n│   └── main.ts\n├── module.json\n```\n\n### Example Svelte Component (`App.svelte`)\n\n```svelte\n\u003cscript\u003e\n  let count = 0;\n\u003c/script\u003e\n\n\u003cstyle\u003e\n  h1 {\n    color: purple;\n  }\n\u003c/style\u003e\n\n\u003cmain\u003e\n  \u003ch1\u003eHello Svelte!\u003c/h1\u003e\n  \u003cbutton on:click={() =\u003e count += 1}\u003e\n    Count: {count}\n  \u003c/button\u003e\n\u003c/main\u003e\n```\n\n### Main Entry File (`main.ts`)\n\n```typescript\nimport App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;\n```\n\n## Benefits of Using BeyondJS Processor for Svelte\n\n1. **Modular Bundling**:\n    - Each Svelte component is bundled independently, leading to faster loading times and better performance.\n2. **Automatic Exports Generation**:\n    - BeyondJS automatically handles the exports during the build process, eliminating the need for manual\n      configuration.\n3. **Lazy Module Generation**:\n\n    - Modules are generated in a lazy mode, resulting in quick start times for the development server.\n\n4. **Integration with SASS**:\n    - The configuration allows using SASS for styling Svelte components, providing a seamless integration of both\n      technologies.\n\n## Conclusion\n\nThe BeyondJS processor for Svelte simplifies the development process by automating the compilation and bundling of\nSvelte components. This modular approach enhances efficiency, performance, and flexibility, enabling developers to build\nscalable and maintainable applications. By leveraging BeyondJS, you can focus on developing high-quality Svelte\napplications with ease.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fsvelte-bundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Fsvelte-bundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fsvelte-bundler/lists"}