Skip to content

Commit 477e87b

Browse files
committed
merging docker work
2 parents 8422ac7 + 46c8905 commit 477e87b

25 files changed

+783
-2997
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ npm install eleventy-plugin-scad
1717
- **launchPath** _(string)_: Location of the OpenSCAD executable (required)
1818
- `auto` - Attempts to use `process.platform` to find OpenSCAD in the default install locations
1919
- `nightly` - Works the same as above for the `nightly` version of OpenSCAD
20-
- `"C:/openscad.exe"` - Absolute paths work too.
21-
- `osc` - Maybe you aliased OpenSCAD and have it on your `$PATH`
20+
- `docker` - Download and use containerized OpenSCAD. Defaults to `trixie`
21+
- `docker:TAG` - You can append a [container tag](https://hub.docker.com/r/openscad/openscad) to use a specific version.
22+
- `C:/openscad.exe` - Absolute paths work too
23+
- `openscad` - or in a bin folder and available on your `$PATH`
2224
- **theme**: Use one of the core W3.org themes
2325
- Traditional, Modernist, Midnight, Chocolate, Oldstyle, Steely, Swiss, Ultramarine
2426
- **layout**: Use a custom layout for the scad files
2527
- This is an escape hatch to make and use your own STL viewer layout. _(needs docs)_
26-
- **collectionPage**: Set `false` to disable the generation of a listing page with links from the `scad` tagged files _(uses Collections API)_
27-
- **verbose**: Set `true` to view the compilation output from OpenSCAD
28+
- **collectionPage** _(default: true)_: Set `false` to disable the generation of a listing page with links from the `scad` tagged files _(uses Collections API)_
29+
- **verbose** _(default: false)_: Set `true` to view the compilation output from OpenSCAD
2830
- If your model uses `echo()` this is how to see the output
29-
- **silent**: Set `true` to disable all logging from the plugin
30-
- **noSTL**: Set `true` to skip generating STLs
31+
- **silent** _(default: false)_: Set `true` to disable all logging from the plugin
32+
- **noSTL** _(default: false)_: Set `true` to skip generating STLs
3133
- Useful when models do not change frequently. Generate once, then disable STLs.
32-
- **checkLaunchPath**: Set `false` to disable the validity check of `launchPath`
33-
- Disable checking if the given `launchPath` exists _(added for testing)_
34+
- **resolveLaunchPath** _(default: true)_: Set `false` to disable internally resolving `launchPath`
35+
- This was added to disable trying to verify if the passed `launchPath` exists and/or is callable.
36+
- Whatever is set to `launchPath` will be passed to `spawn(launchPath, ["--o", STL_OUT_FILE, SCAD_INPUT]);`
3437

3538
## Add Plugin to Eleventy
3639

biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.4/schema.json",
33
"root": true,
44
"vcs": {
55
"enabled": true,

demo.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

dist/index.d.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import z from "zod";
22
import { EleventyScope, EleventySuppliedData } from "11ty.ts";
33

44
//#region rolldown:runtime
5+
56
//#endregion
67
//#region src/core/const.d.ts
78
declare const THEMES: readonly ["Traditional", "Modernist", "Midnight", "Chocolate", "Oldstyle", "Steely", "Swiss", "Ultramarine"];
@@ -20,23 +21,24 @@ declare const PluginOptionsSchema: z.ZodObject<{
2021
Ultramarine: "Ultramarine";
2122
}>>, z.ZodTransform<"Traditional" | "Modernist" | "Midnight" | "Chocolate" | "Oldstyle" | "Steely" | "Swiss" | "Ultramarine", "Traditional" | "Modernist" | "Midnight" | "Chocolate" | "Oldstyle" | "Steely" | "Swiss" | "Ultramarine" | undefined>>;
2223
layout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23-
checkLaunchPath: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
24+
resolveLaunchPath: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
2425
collectionPage: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
2526
verbose: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
2627
silent: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
2728
noSTL: z.ZodDefault<z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodCodec<z.ZodString, z.ZodBoolean>]>>>;
2829
}, z.core.$strip>;
2930
declare namespace types_d_exports {
30-
export { EleventyDirs, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, ScadTemplateData };
31+
export { DockerTag, EleventyDirs, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, ScadTemplateData };
3132
}
3233
import * as import__11ty_ts from "11ty.ts";
3334
__reExport(types_d_exports, import__11ty_ts);
3435
type ModelViewerTheme = (typeof THEMES)[number];
3536
type PluginOptions = z.infer<typeof PluginOptionsSchema>;
3637
type ParsedPluginOptions = z.output<typeof PluginOptionsSchema>;
3738
type PluginOptionsInput = Omit<z.input<typeof PluginOptionsSchema>, "launchPath"> & {
38-
launchPath: "auto" | "nightly" | (string & {});
39+
launchPath: "auto" | "nightly" | "docker" | (string & {});
3940
};
41+
type DockerTag = "latest" | "trixie" | "bookworm" | (string & {});
4042
type ScadTemplateData = {
4143
layout: string;
4244
title: string;
@@ -99,9 +101,9 @@ declare const SCAD_BINS: {
99101
* Returns the OpenSCAD binary path for the current platform.
100102
*/
101103
declare namespace index_d_exports {
102-
export { EleventyDirs, EleventyPluginOpenSCAD, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, SCAD_BINS, ScadTemplateData, addOpenSCADPlugin, EleventyPluginOpenSCAD as default };
104+
export { DockerTag, EleventyDirs, EleventyPluginOpenSCAD, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, SCAD_BINS, ScadTemplateData, addOpenSCADPlugin, EleventyPluginOpenSCAD as default };
103105
}
104106
__reExport(index_d_exports, types_d_exports);
105107

106108
//#endregion
107-
export { EleventyDirs, EleventyPluginOpenSCAD, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, SCAD_BINS, ScadTemplateData, addOpenSCADPlugin, EleventyPluginOpenSCAD as default };
109+
export { DockerTag, EleventyDirs, EleventyPluginOpenSCAD, FullPageData, MainPlatforms, ModelViewerTheme, ParsedPluginOptions, PlatformMap, PluginOptions, PluginOptionsInput, SCAD_BINS, ScadTemplateData, addOpenSCADPlugin, EleventyPluginOpenSCAD as default };

0 commit comments

Comments
 (0)