Skip to content

Commit fa3d232

Browse files
committed
Ready to publish
1 parent f54271b commit fa3d232

File tree

5 files changed

+31
-90
lines changed

5 files changed

+31
-90
lines changed

.tkb

Lines changed: 4 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,28 @@
11
{
22
"scope": "Workspace",
33
"tasks": {
4-
"RX4J5v4y5IOe_ucf8pMRT": {
5-
"id": "RX4J5v4y5IOe_ucf8pMRT",
6-
"description": "🌟 Enable [private vulnerability reporting](https://github.com/react18-tools/esbuild-plugin-webgl/security) (For public repo - do this after updating visibility to public)",
7-
"columnId": "column-todo"
8-
},
9-
"EdPbrbJLllUHfZmCS80f7": {
10-
"id": "EdPbrbJLllUHfZmCS80f7",
11-
"description": "Set up `CodeCov`\n - Visit Codecov and set up your repo\n - Create [repository secret]((https://github.com/react18-tools/esbuild-plugin-webgl/settings/secrets/actions)) for `CODECOV_TOKEN`",
12-
"columnId": "column-todo"
13-
},
14-
"MLLUsAhCKaKxvEXFY0HSq": {
15-
"id": "MLLUsAhCKaKxvEXFY0HSq",
16-
"description": "Set up `CodeClimate`\n - Visit CodeClimate and set up your repo\n - Create [repository secret] for `CC_TEST_REPORTER_ID`\n - Add `*.test.*` to ignore patterns on the website\n - Update Code Climate badge",
17-
"columnId": "column-todo"
18-
},
19-
"gMYfaAh2RABMP8uZRQgNx": {
20-
"id": "gMYfaAh2RABMP8uZRQgNx",
21-
"description": "Add `NPM_AUTH_TOKEN` to repository secrets to automate package publishing\n - Log in to your [`npm` account](https://www.npmjs.com/login) and create an automation token\n - Create a new repository secret `NPM_AUTH_TOKEN`",
22-
"columnId": "column-todo"
23-
},
24-
"dC7QDBLH8BmHUfaYmIt81": {
25-
"id": "dC7QDBLH8BmHUfaYmIt81",
26-
"description": "(Optional) Add Repo Stats by visiting and setting up [repobeats](https://repobeats.axiom.co/)",
27-
"columnId": "column-todo"
28-
},
294
"P_NrSJQ8m91Odgz8E1fS6": {
305
"id": "P_NrSJQ8m91Odgz8E1fS6",
31-
"description": "Create your library and update examples",
32-
"columnId": "column-todo"
6+
"description": "update examples",
7+
"columnId": "column-doing"
338
},
349
"1dRWJhy45E1Rq5wZAmPHt": {
3510
"id": "1dRWJhy45E1Rq5wZAmPHt",
3611
"description": "Update README as required",
3712
"columnId": "column-doing"
38-
},
39-
"5vS1JNXoMhDl5IBljwh2v": {
40-
"id": "5vS1JNXoMhDl5IBljwh2v",
41-
"description": "Set up GitHub pages to deploy docs\n - Go to [repo settings](https://github.com/react18-tools/esbuild-plugin-webgl/settings/pages) -> pages (On the left panel); Select deploy from a branch; Then Select `main` and `/docs`",
42-
"columnId": "column-todo"
43-
},
44-
"55DAZwduwTvlaxaJC8hlX": {
45-
"id": "55DAZwduwTvlaxaJC8hlX",
46-
"description": "(Optional) Set up [Deepsource](https://app.deepsource.com/login) for static code analysis",
47-
"columnId": "column-todo"
48-
},
49-
"FDFqCQvLm2mUlnTJ3Gna5": {
50-
"id": "FDFqCQvLm2mUlnTJ3Gna5",
51-
"description": "Push your changes/Create PR and see your library being automatically tested and published",
52-
"columnId": "column-todo"
53-
},
54-
"O1qAByMoxhHOR-a_guL91": {
55-
"id": "O1qAByMoxhHOR-a_guL91",
56-
"description": "Optionally deploy your examples to Vercel.",
57-
"columnId": "column-todo"
58-
},
59-
"0499BqWDwJ5cxqtC9Nr82": {
60-
"id": "0499BqWDwJ5cxqtC9Nr82",
61-
"description": "Feel free to star this template, contribute, and/or sponsor the [`terborepo-template`](https://github.com/react18-tools/turborepo-template) project or my [other open-source work](https://github.com/sponsors/mayank1513)",
62-
"columnId": "column-todo"
63-
},
64-
"IjuAtNquJ4-Ut874rHKIW": {
65-
"id": "IjuAtNquJ4-Ut874rHKIW",
66-
"description": "You can also fork the [`terborepo-template`](https://github.com/react18-tools/turborepo-template/fork) and add your package to `scripts/featured.json`\n - If approved, your package will be automatically added to FEATURED.md and also published on the home page of this repo.",
67-
"columnId": "column-todo"
6813
}
6914
},
7015
"columns": [
7116
{
7217
"id": "column-todo",
7318
"title": "To do",
74-
"tasksIds": [
75-
"RX4J5v4y5IOe_ucf8pMRT",
76-
"EdPbrbJLllUHfZmCS80f7",
77-
"MLLUsAhCKaKxvEXFY0HSq",
78-
"gMYfaAh2RABMP8uZRQgNx",
79-
"dC7QDBLH8BmHUfaYmIt81",
80-
"P_NrSJQ8m91Odgz8E1fS6",
81-
"5vS1JNXoMhDl5IBljwh2v",
82-
"55DAZwduwTvlaxaJC8hlX",
83-
"FDFqCQvLm2mUlnTJ3Gna5",
84-
"O1qAByMoxhHOR-a_guL91",
85-
"0499BqWDwJ5cxqtC9Nr82",
86-
"IjuAtNquJ4-Ut874rHKIW"
87-
]
19+
"tasksIds": []
8820
},
8921
{
9022
"id": "column-doing",
9123
"title": "Doing",
9224
"tasksIds": [
25+
"P_NrSJQ8m91Odgz8E1fS6",
9326
"1dRWJhy45E1Rq5wZAmPHt"
9427
]
9528
}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Esbuild Plugin Webgl <img src="https://github.com/react18-tools/esbuild-plugin-webgl/blob/main/popper.png?raw=true" style="height: 40px"/>
22

3-
[![test](https://github.com/react18-tools/esbuild-plugin-webgl/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/esbuild-plugin-webgl/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/aa896ec14c570f3bb274/maintainability)](https://codeclimate.com/github/react18-tools/esbuild-plugin-webgl/maintainability) [![codecov](https://codecov.io/gh/react18-tools/esbuild-plugin-webgl/graph/badge.svg)](https://codecov.io/gh/react18-tools/esbuild-plugin-webgl) [![Version](https://img.shields.io/npm/v/esbuild-plugin-webgl.svg?colorB=green)](https://www.npmjs.com/package/esbuild-plugin-webgl) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/esbuild-plugin-webgl.svg)](https://www.npmjs.com/package/esbuild-plugin-webgl) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/esbuild-plugin-webgl) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
3+
[![test](https://github.com/react18-tools/esbuild-plugin-webgl/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/esbuild-plugin-webgl/actions/workflows/test.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/c2532ae011e53b1bf011/maintainability)](https://codeclimate.com/github/react18-tools/esbuild-plugin-webgl/maintainability) [![codecov](https://codecov.io/gh/react18-tools/esbuild-plugin-webgl/graph/badge.svg)](https://codecov.io/gh/react18-tools/esbuild-plugin-webgl) [![Version](https://img.shields.io/npm/v/esbuild-plugin-webgl.svg?colorB=green)](https://www.npmjs.com/package/esbuild-plugin-webgl) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/esbuild-plugin-webgl.svg)](https://www.npmjs.com/package/esbuild-plugin-webgl) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/esbuild-plugin-webgl) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
44

55
ESBuild plugin to load webGL shaders from `.glsl` files.
66

@@ -52,6 +52,8 @@ esbuild.build({
5252
});
5353
```
5454

55+
![Alt](https://repobeats.axiom.co/api/embed/a1fadcf8aa3054acff5d430c970af9e61254da5c.svg "Repobeats analytics image")
56+
5557
## License
5658

5759
This library is licensed under the MPL-2.0 open-source license.

examples/vite/src/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useCallback } from "react";
22
import "./styles.css";
3-
import { Bars1, Bars2, Dots1, Dots2 } from "react18-loaders/dist/server";
3+
import { Bars1 } from "react18-loaders/dist/server";
44
import { LoaderContainer, useLoader } from "react18-loaders";
55
import { LandingPage, Layout } from "@repo/shared/dist/server";
66
import { Core } from "nextjs-darkmode";

lib/package.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,25 @@
6767
}
6868
],
6969
"keywords": [
70-
"React",
71-
"React Loaders",
72-
"React 18",
73-
"React 19",
74-
"Next.js",
75-
"Next.js 14",
76-
"Next.js 15",
77-
"React server components",
78-
"Customizable",
79-
"Cutting-edge",
80-
"Compatibility",
81-
"Frontend development",
82-
"UI components",
83-
"Web development",
84-
"Progressive",
85-
"Modern",
86-
"Seamless integration"
70+
"ESBuild",
71+
"WebGL",
72+
"WebGL shaders",
73+
"WebGL loader",
74+
"GLSL",
75+
"shader",
76+
"ESBuild plugin",
77+
"loaders",
78+
"frontend development",
79+
"web development",
80+
"JavaScript",
81+
"TypeScript",
82+
"bundler",
83+
"build tool",
84+
"performance",
85+
"3D graphics",
86+
"rendering",
87+
"graphics pipeline",
88+
"shader programming",
89+
"cross-platform"
8790
]
8891
}

lib/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import type { Plugin, PluginBuild } from "esbuild";
22
import fs from "node:fs";
33

4+
/** generate randmo id */
45
const uuid = () => (Date.now() * Math.random()).toString(36).slice(0, 8);
56

7+
/** generate randmo name to avoid collision among the plugins */
68
const name = `webgl-${uuid()}`;
79

10+
/** Plugin to load `.glsl` files as minified strings */
811
export const webglPlugin: () => Plugin = () => ({
912
name,
1013
setup(build: PluginBuild) {

0 commit comments

Comments
 (0)