@bendyline/molen-pack 0.0.1 → 0.0.2
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 +9 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -43,17 +43,22 @@ the small documents. Other files are read on demand with HTTP range requests; re
|
|
|
43
43
|
together are merged when they sit close in the file, at most six run at once, and transient
|
|
44
44
|
failures are retried. A server that ignores `Range` just sends the whole file, which is used as is.
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Molen's own packs (entities, the default style pack, the Earth catalogs, the star table) are
|
|
47
|
+
published at [molen.dev/packs](https://molen.dev/packs/index.json).
|
|
48
|
+
`npx molen pack fetch https://molen.dev/packs/index.json` downloads them and pins each one's
|
|
49
|
+
`contentHash` in `project.json`.
|
|
50
|
+
|
|
51
|
+
Build your own packs with the CLI (`molen pack build <dir> --out-dir <d>`) or in code:
|
|
47
52
|
|
|
48
53
|
```ts
|
|
49
54
|
import { buildPack, openDirPack } from '@bendyline/molen-pack/node';
|
|
50
55
|
|
|
51
56
|
// A directory with a molen-pack.source.json describing the pack.
|
|
52
|
-
const built = await buildPack('content/
|
|
53
|
-
built.file; // '
|
|
57
|
+
const built = await buildPack('content/my-props', { outDir: 'dist/packs' });
|
|
58
|
+
built.file; // 'my.props-3f2a9c1e5b7d.zip', named by a hash of its bytes
|
|
54
59
|
|
|
55
60
|
// The same content, unzipped: handy in tests and during development.
|
|
56
|
-
const pack = await openDirPack('content/
|
|
61
|
+
const pack = await openDirPack('content/my-props');
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
## What's in it
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/molen-pack",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"fflate": "0.8.3",
|
|
45
|
-
"@bendyline/molen-schema": "0.0.
|
|
45
|
+
"@bendyline/molen-schema": "0.0.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@biomejs/biome": "^2.5.0",
|
|
49
49
|
"@types/node": "^24",
|
|
50
50
|
"tsdown": "^0.22.2",
|
|
51
51
|
"typescript": "^6.0.3",
|
|
52
|
-
"vitest": "^
|
|
52
|
+
"vitest": "^5.0.1"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsdown",
|