{"id":28430990,"url":"https://github.com/beyondjs/code-bundler","last_synced_at":"2025-07-04T17:31:02.228Z","repository":{"id":244810382,"uuid":"816306584","full_name":"beyondjs/code-bundler","owner":"beyondjs","description":"The BeyondJS Code Bundle supports multiple processors , allowing you to encapsulate various technologies within your application. It generates independent style bundles (bundle-name.css) for enhanced modularity and maintainability. Ideal for integrating diverse technologies seamlessly and efficiently.","archived":false,"fork":false,"pushed_at":"2025-05-27T00:07:41.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-05T14:42:06.397Z","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":"mit","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":"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":"2024-06-17T13:25:18.000Z","updated_at":"2025-05-27T00:07:44.000Z","dependencies_parsed_at":"2024-12-21T18:33:52.815Z","dependency_job_id":"8faad19b-0f78-4fcc-bd71-d28e459bbfa2","html_url":"https://github.com/beyondjs/code-bundler","commit_stats":null,"previous_names":["beyondjs/code-bundle","beyondjs/code-bundler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beyondjs/code-bundler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode-bundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode-bundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode-bundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode-bundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/code-bundler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fcode-bundler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263587926,"owners_count":23484831,"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":"2025-06-05T14:34:04.141Z","updated_at":"2025-07-04T17:31:02.220Z","avatar_url":"https://github.com/beyondjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeyondJS Code Bundle\n\n## Overview\n\nThe BeyondJS Code Bundle is a versatile and powerful bundle designed to handle multiple processors, making it ideal for\nprojects that require the integration of different technologies. This bundle supports a wide range of processors,\nallowing you to encapsulate various technologies within your application.\n\n## Features\n\n-   **Multi-Processor Support**: Seamlessly integrates TypeScript, JavaScript, JSX, Sass, Less, SCSS, Svelte, Vue, and\n    MDX.\n-   **Independent Style Bundles**: CSS processors like Sass and Less generate independent bundles of styles\n    (`bundle-name.css`).\n-   **Template Support**: Allows for templating within the bundle to enhance modularity and reusability.\n\n## Configuration\n\nThe configuration for the Code Bundle is defined in your module's `module.json` file. Below is an example configuration:\n\n```json\n{\n\t\"name\": \"my-code-bundle\",\n\t\"platforms\": [\"web\"],\n\t\"code\": {\n\t\t\"ts\": {\n\t\t\t\"path\": \"ts\",\n\t\t\t\"files\": \"*\"\n\t\t},\n\t\t\"scss\": {\n\t\t\t\"path\": \"scss\",\n\t\t\t\"files\": \"*\"\n\t\t}\n\t}\n}\n```\n\n### Key Properties\n\n-   **`bundles`**: Specifies the list of bundles in the module.\n-   **`name`**: The name of the bundle.\n-   **`type`**: The type of bundle, which should be set to `code` for this configuration.\n-   **`platforms`**: Specifies the platforms the bundle supports.\n-   **`code`**: Contains configuration details specific to the code bundle.\n    -   **`processors`**: Lists the processors supported by the bundle.\n\n## Processors\n\nThe Code Bundle supports the following processors, each handling different file types and technologies:\n\n-   **TypeScript (`ts`)**: Compiles TypeScript files.\n-   **JavaScript (`js`)**: Handles standard JavaScript files.\n-   **JSX (`jsx`)**: Processes JSX files, typically used with React.\n-   **Less (`less`)**: Compiles Less files into CSS.\n-   **SCSS (`scss`)**: Compiles SCSS files into CSS.\n-   **Svelte (`svelte`)**: Compiles Svelte components.\n-   **Vue (`vue`)**: Compiles Vue components.\n-   **MDX (`mdx`)**: Processes MDX files, which allow you to write JSX in Markdown.\n\n### Independent Style Bundles\n\nWhen using CSS processors like Sass, Less, or SCSS, the Code Bundle generates an independent style bundle named\n`bundle-name.css`. This approach ensures that your styles are modular and can be independently managed, improving the\nmaintainability and scalability of your application.\n\n## Example\n\nHere is a basic example of how to set up a module with the Code Bundle in BeyondJS:\n\n1.  **Create a `module.json` file** in your module directory with the following content:\n\n        ```json\n        {\n        \"name\": \"my-code-bundle\",\n        \"platforms\": [\"web\"],\n        \"code\": {\n        \t\"ts\": {\n        \t\t\"path\": \"ts\",\n        \t\t\"files\": \"*\"\n        \t},\n        \t\"scss\": {\n        \t\t\"path\": \"scss\",\n        \t\t\"files\": \"*\"\n        \t}\n        }\n\n    }```\n\n2.  **Add your source files** to the appropriate directories for each processor.\n\n3.  **Build your project** to see the generated JavaScript and CSS bundles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fcode-bundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Fcode-bundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fcode-bundler/lists"}