@tomvandig/mosaic 0.0.0-stage → 0.1.0
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 +50 -2
- package/dist/mosaic.cjs +97555 -0
- package/package.json +54 -4
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tomvandig/mosaic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command line for [Mosaic](https://tomvandig.github.io/mosaic/dist/docs/), a file format for
|
|
4
|
+
incremental collaboration on geometric, structured data.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx @tomvandig/mosaic help
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Or install it, and the command is `mosaic`:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @tomvandig/mosaic
|
|
14
|
+
mosaic help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Needs Node.js 24 or later.
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
| Command | |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `mosaic pack <input.json> [output.tsr]` | Pack a Mosaic source document into a `.tsr` archive |
|
|
24
|
+
| `mosaic gltf <input.gltf\|.glb> [output.mosaic.json] [--stable-ids]` | Convert glTF into a source document |
|
|
25
|
+
| `mosaic gltf-pack <input.gltf\|.glb> [output.tsr] [--stable-ids]` | Convert glTF straight into an archive |
|
|
26
|
+
| `mosaic ifc <input.ifc> [output.mosaic.json]` | Convert an IFC model into a source document |
|
|
27
|
+
| `mosaic ifc-pack <input.ifc> [output.tsr]` | Convert an IFC model straight into an archive |
|
|
28
|
+
| `mosaic svg-pack <input.svg> [output.tsr]` | Pack an SVG into an archive of one node |
|
|
29
|
+
| `mosaic compose <input.tsr\|.duckdb> [output.glb]` | Compose an archive and its imports into a `.glb` |
|
|
30
|
+
| `mosaic serve <database.duckdb> [--port <n>] [--host <name>]` | Serve the Mosaic API, and a viewer, over a database |
|
|
31
|
+
| `mosaic codegen <input_dir> <output_dir> <ts\|cs>` | Generate typed classes from component schemas |
|
|
32
|
+
|
|
33
|
+
See [the documentation](https://tomvandig.github.io/mosaic/dist/docs/tools/) for each.
|
|
34
|
+
|
|
35
|
+
## DuckDB
|
|
36
|
+
|
|
37
|
+
The commands that read or write a database (`compose` given a `.duckdb`, and `serve`) need
|
|
38
|
+
[DuckDB](https://duckdb.org). It isn't installed with the CLI, because its native binary is large
|
|
39
|
+
and no other command uses it. If it's missing, the CLI says so and gives the exact command, for
|
|
40
|
+
example:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install @duckdb/node-api@1.5.5-r.4
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run it in the directory you run `mosaic` from, or set `MOSAIC_DUCKDB` to a directory where it is
|
|
47
|
+
installed.
|
|
48
|
+
|
|
49
|
+
## Status
|
|
50
|
+
|
|
51
|
+
Mosaic is pre-1.0. Expect breaking changes.
|