@textmode/build 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -24
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
+
<img alt="@textmode/build — build textmode with vite and vitest" src=".github/assets/readme-og.png" />
|
|
6
|
+
|
|
5
7
|
| [](https://developer.mozilla.org/en-US/docs/Web/JavaScript) [](https://vitejs.dev/) [](https://vitest.dev/) | [](https://code.textmode.art/) [](https://discord.gg/sjrw8QXNks) | [](https://ko-fi.com/V7V8JG2FY) [](https://github.com/sponsors/humanbydefinition) |
|
|
6
|
-
|
|
|
8
|
+
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
9
|
|
|
8
10
|
</div>
|
|
9
11
|
|
|
@@ -17,7 +19,6 @@ Use it to give every repository the same library build, dev server, preview, and
|
|
|
17
19
|
- **One command** - `textmode-build build`, `dev`, `preview`, `test`, and `test:watch` cover the whole surface.
|
|
18
20
|
- **Zero config** - Conventional library projects need no Vite or Vitest configuration; the shared `defineTextmodeLibrary` and `defineTextmodeProject` helpers ship in the package.
|
|
19
21
|
- **Shared GLSL pipeline** - The `textmodeGlsl` plugin (loading, composition, minification, and identifier coordination) is included.
|
|
20
|
-
- **Backward compatible behavior** - The build contract, test helper, and GLSL plugin are identical to the previous `@textmode/vite-config`, `@textmode/vitest-config`, and `@textmode/vite-plugin-glsl` packages.
|
|
21
22
|
|
|
22
23
|
## Installation
|
|
23
24
|
|
|
@@ -130,7 +131,8 @@ global, and sets `__TEXTMODE_VERSION__` and `IS_MINIFIED` build constants.
|
|
|
130
131
|
|
|
131
132
|
`defineTextmodeProject` uses Vitest with a jsdom environment and `globals`,
|
|
132
133
|
applies a `@` alias to `src`, and supports `projects`, `coverage`, `plugins`,
|
|
133
|
-
`setupFiles`, and custom `alias` entries.
|
|
134
|
+
`setupFiles`, and custom `alias` entries. If your test files import from
|
|
135
|
+
`vitest` directly, keep `vitest` as a devDependency for type resolution.
|
|
134
136
|
|
|
135
137
|
### GLSL
|
|
136
138
|
|
|
@@ -140,25 +142,14 @@ coordinated modules, resolves `#include` graphs, minifies shaders, and
|
|
|
140
142
|
optionally rewrites private host identifiers when `hostIdentifiers.sourceRoots`
|
|
141
143
|
is provided.
|
|
142
144
|
|
|
143
|
-
## Configuration ownership
|
|
144
|
-
|
|
145
|
-
- `@textmode/build` owns the Vite build contract, the Vitest helper, the GLSL
|
|
146
|
-
plugin, and command behavior.
|
|
147
|
-
- `vite.config.ts` and `vitest.config.ts` own only project-specific options
|
|
148
|
-
(globals, ports, shader roots, test lanes).
|
|
149
|
-
|
|
150
|
-
Consumers should not declare `vite`, `vitest`, `terser`, `jsdom`, or the former
|
|
151
|
-
`@textmode/vite-config`, `@textmode/vitest-config`, and
|
|
152
|
-
`@textmode/vite-plugin-glsl` packages.
|
|
153
|
-
|
|
154
145
|
## Related packages
|
|
155
146
|
|
|
156
147
|
`@textmode/build` works with the following textmode-tooling packages:
|
|
157
148
|
|
|
158
|
-
| Package
|
|
159
|
-
|
|
|
160
|
-
| [`@textmode/
|
|
161
|
-
| [`@textmode/tsconfig`](../tsconfig/README.md)
|
|
149
|
+
| Package | Relationship |
|
|
150
|
+
| --------------------------------------------- | ----------------------------------------------------------- |
|
|
151
|
+
| [`@textmode/release`](../release/README.md) | Publishes artifacts produced by this package's `build` script |
|
|
152
|
+
| [`@textmode/tsconfig`](../tsconfig/README.md) | Library builds compile against the shared TypeScript policy |
|
|
162
153
|
|
|
163
154
|
## License
|
|
164
155
|
|
|
@@ -167,11 +158,11 @@ The `@textmode/build` package is licensed under the [CC0 1.0 Universal](./LICENS
|
|
|
167
158
|
## Acknowledgements
|
|
168
159
|
|
|
169
160
|
- **[Vite](https://vitejs.dev/)**
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
- The bundler and dev server behind `textmode-build build`, `dev`, and `preview`.
|
|
162
|
+
- License: [MIT](https://github.com/vitejs/vite/blob/main/LICENSE).
|
|
172
163
|
- **[Vitest](https://vitest.dev/)**
|
|
173
|
-
|
|
174
|
-
|
|
164
|
+
- The test runner behind `textmode-build test` and `test:watch`.
|
|
165
|
+
- License: [MIT](https://github.com/vitest-dev/vitest/blob/main/LICENSE).
|
|
175
166
|
- **[`glsl-minify`](https://github.com/mapwhit/glsl-minify)**
|
|
176
|
-
|
|
177
|
-
|
|
167
|
+
- The GLSL minifier used by the shared plugin.
|
|
168
|
+
- License: [MIT](https://github.com/mapwhit/glsl-minify/blob/main/LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textmode/build",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "CC0-1.0",
|
|
6
6
|
"description": "Shared build, dev, and test tooling for the textmode.js ecosystem (Vite, Vitest, GLSL).",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@mapwhit/glsl-minify": "^1.0.0",
|
|
43
43
|
"@vitest/coverage-v8": "^4.1.10",
|
|
44
44
|
"jsdom": "^30.0.0",
|
|
45
|
-
"terser": "^5.
|
|
45
|
+
"terser": "^5.50.0",
|
|
46
46
|
"vite": "^8.1.3",
|
|
47
47
|
"vitest": "^4.1.10"
|
|
48
48
|
},
|