{"id":13790032,"url":"https://github.com/vanruesc/esbuild-plugin-glsl","last_synced_at":"2025-04-07T05:08:37.090Z","repository":{"id":42992490,"uuid":"319462103","full_name":"vanruesc/esbuild-plugin-glsl","owner":"vanruesc","description":"A GLSL plugin for esbuild.","archived":false,"fork":false,"pushed_at":"2025-03-20T16:03:54.000Z","size":406,"stargazers_count":41,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T04:04:54.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanruesc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-12-07T22:36:09.000Z","updated_at":"2025-03-20T16:09:15.000Z","dependencies_parsed_at":"2024-10-15T21:01:21.875Z","dependency_job_id":"1f4931e4-7a88-4448-82c6-5174364748af","html_url":"https://github.com/vanruesc/esbuild-plugin-glsl","commit_stats":{"total_commits":98,"total_committers":5,"mean_commits":19.6,"dds":"0.061224489795918324","last_synced_commit":"df8642eb5863e4d94c24aa447fd4e5abeac935f7"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fesbuild-plugin-glsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fesbuild-plugin-glsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fesbuild-plugin-glsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fesbuild-plugin-glsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanruesc","download_url":"https://codeload.github.com/vanruesc/esbuild-plugin-glsl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595334,"owners_count":20963943,"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-08-03T22:00:36.142Z","updated_at":"2025-04-07T05:08:37.065Z","avatar_url":"https://github.com/vanruesc.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# esbuild-plugin-glsl\n\n[![CI](https://badgen.net/github/checks/vanruesc/esbuild-plugin-glsl/main)](https://github.com/vanruesc/esbuild-plugin-glsl/actions)\n[![Version](https://badgen.net/npm/v/esbuild-plugin-glsl?color=green)](https://www.npmjs.com/package/esbuild-plugin-glsl)\n\nAn [esbuild plugin](https://esbuild.github.io/plugins/) that adds support for `.frag`, `.vert`, `.glsl` and `.wgsl` [file imports](https://esbuild.github.io/content-types/#text) with optional shader minification.\n\n## Installation\n\n```sh\nnpm install esbuild-plugin-glsl\n```\n\n## Usage\n\n```js\nimport { build } from \"esbuild\";\nimport { glsl } from \"esbuild-plugin-glsl\";\n\nbuild({\n\tentryPoints: [\"input.js\"],\n\toutfile: \"output.js\",\n\tbundle: true,\n\tplugins: [glsl({\n\t\tminify: true\n\t})]\n});\n```\n\n### Options\n\n| Option                | Description                                                                                  | Default                                                                 |\n|-----------------------|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| minify                | Enables or disables basic shader minification.                                               | follows [minify](https://esbuild.github.io/api/#minify)                 |\n| resolveIncludes       | When enabled, shaders can include other shaders with the custom `#include \"path\"` directive. | `true`                                                                  |\n| preserveLegalComments | Preserves comments that start with `//!` or `/*!` or include `@license` or `@preserve`.      | follows [legal-comments](https://esbuild.github.io/api/#legal-comments) |\n\n### TypeScript\n\nTo make the TypeScript compiler know how to handle shader sources, add a `shaders.d.ts` [ambient declaration file](https://basarat.gitbook.io/typescript/type-system/intro/d.ts) to your project:\n\n```ts\ndeclare module \"*.wgsl\" {\n\tconst value: string;\n\texport default value;\n}\n\ndeclare module \"*.glsl\" {\n\tconst value: string;\n\texport default value;\n}\n\ndeclare module \"*.frag\" {\n\tconst value: string;\n\texport default value;\n}\n\ndeclare module \"*.vert\" {\n\tconst value: string;\n\texport default value;\n}\n```\n\n## Contributing\n\nUse the issue tracker to propose and discuss changes. Maintain the existing coding style. Lint and test your code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fesbuild-plugin-glsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanruesc%2Fesbuild-plugin-glsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fesbuild-plugin-glsl/lists"}