@uniflowed/config 0.0.0-alpha.14 → 0.0.0-alpha.15
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/internal/schema.js +51 -0
- package/package.json +1 -1
package/internal/schema.js
CHANGED
|
@@ -124,6 +124,27 @@ export type UniflowedConfig = {
|
|
|
124
124
|
// faces `uf_assets::font::LOCAL_FACES` knows the metrics of, because
|
|
125
125
|
// the scaling is a ratio against real numbers rather than a guess.
|
|
126
126
|
readonly fallback?: string,
|
|
127
|
+
// How an imported family is cut down. `"none"` is the default and the
|
|
128
|
+
// argued position: subsetting is lossy, and a build cannot see the
|
|
129
|
+
// text a server will render or a user will type. `"ranges"` splits the
|
|
130
|
+
// font's own coverage into script buckets with exact `unicode-range`
|
|
131
|
+
// values and loses nothing.
|
|
132
|
+
readonly subset?: "none" | "ranges",
|
|
133
|
+
// Whether `Font` preloads the primary face. Exactly one file is ever
|
|
134
|
+
// preloaded, however many buckets a split produced.
|
|
135
|
+
readonly preload?: boolean,
|
|
136
|
+
},
|
|
137
|
+
readonly icons?: {
|
|
138
|
+
readonly enabled?: boolean,
|
|
139
|
+
// Where `uf:icon/<name>` looks for `<name>.svg`, from the project
|
|
140
|
+
// root. A directory rather than a claim on `.svg`, which stays Vite's.
|
|
141
|
+
readonly dir?: string,
|
|
142
|
+
},
|
|
143
|
+
readonly og?: {
|
|
144
|
+
readonly enabled?: boolean,
|
|
145
|
+
// The typeface every `*.og.json` is drawn with unless it names its
|
|
146
|
+
// own. uf embeds none, so a project that draws cards points at one.
|
|
147
|
+
readonly font?: string | null,
|
|
127
148
|
},
|
|
128
149
|
readonly motion?: {
|
|
129
150
|
readonly module?: "@uniflowed/motion",
|
|
@@ -178,6 +199,10 @@ export type UniflowedConfig = {
|
|
|
178
199
|
readonly entry?: string,
|
|
179
200
|
readonly root?: string,
|
|
180
201
|
readonly manifest?: string,
|
|
202
|
+
// Turning the file-system router off is what makes a project a
|
|
203
|
+
// **library** rather than an application, and `uf build` reads it: see
|
|
204
|
+
// `build.lib` below and docs/app/reference/config.
|
|
205
|
+
readonly enabled?: boolean,
|
|
181
206
|
},
|
|
182
207
|
readonly rendering?: {
|
|
183
208
|
readonly modes?: $ReadOnlyArray<"ppr" | "ssr" | "ssg" | "isr">,
|
|
@@ -196,6 +221,32 @@ export type UniflowedConfig = {
|
|
|
196
221
|
// with `app.rendering.modes`; see docs/app/reference/config.
|
|
197
222
|
readonly staticBuild?: boolean,
|
|
198
223
|
readonly sourcemap?: boolean,
|
|
224
|
+
/**
|
|
225
|
+
* What a **library** build writes, for a project whose
|
|
226
|
+
* `app.router.enabled` is false.
|
|
227
|
+
*
|
|
228
|
+
* Never the switch. `app.router.enabled` decides which of the two builds
|
|
229
|
+
* `uf build` runs, and declaring this key in a project whose router is on
|
|
230
|
+
* is refused where the config is read rather than resolved by precedence.
|
|
231
|
+
* Every field has a default that builds what `uf new --lib` scaffolds, so
|
|
232
|
+
* a library ordinarily writes none of this.
|
|
233
|
+
*
|
|
234
|
+
* `"umd"` and `"iife"` are deliberately absent from `formats`: each needs
|
|
235
|
+
* a global name per entry, and what a Flow library's global should be is
|
|
236
|
+
* not a decision uf has made.
|
|
237
|
+
*/
|
|
238
|
+
readonly lib?: {
|
|
239
|
+
// The modules to build, relative to the project root. Each names its own
|
|
240
|
+
// output by its path — `internal/parse.js` is written to
|
|
241
|
+
// `dist/internal/parse.js` — so two entries cannot collide.
|
|
242
|
+
readonly entries?: $ReadOnlyArray<string>,
|
|
243
|
+
readonly formats?: $ReadOnlyArray<"es" | "cjs">,
|
|
244
|
+
// Package names to leave as imports *beyond* the ones the manifest
|
|
245
|
+
// declares. A library build already externalises `dependencies`,
|
|
246
|
+
// `peerDependencies`, `optionalDependencies` and the host's built-in
|
|
247
|
+
// modules; this is for what a manifest cannot say.
|
|
248
|
+
readonly external?: $ReadOnlyArray<string>,
|
|
249
|
+
},
|
|
199
250
|
},
|
|
200
251
|
// Which builder uf drives. Vite is the default, not a dependency: any module
|
|
201
252
|
// satisfying the contract in docs/architecture.md can be named here.
|