sci2-ts 0.6.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project. Versions follow [Semantic Versioning](https
4
4
  and the entries are generated from commit messages
5
5
  ([Conventional Commits](https://www.conventionalcommits.org/)) when a release is made.
6
6
 
7
+ ## [0.6.1](https://github.com/rlueder/sci-ts/compare/v0.6.0...v0.6.1) (2026-10-01)
8
+
9
+ ### Fixed
10
+
11
+ * **tools:** the site uses the game's own SoundFont ([#5](https://github.com/rlueder/sci-ts/issues/5)) ([b275b0d](https://github.com/rlueder/sci-ts/commit/b275b0d89479c233153e3efb31fafabdbc5fdcdb))
12
+
7
13
  ## [0.6.0](https://github.com/rlueder/sci-ts/compare/v0.5.0...v0.6.0) (2026-10-01)
8
14
 
9
15
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sci2-ts",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "An SCI2 adventure game engine in TypeScript, and the tools to make games with it",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,12 +10,13 @@ import { markdown } from "./markdown.js";
10
10
  * docs/... docs/**.md as pages, and their screenshots
11
11
  * play/play.html the player, with the game in play/game/
12
12
  *
13
- * The SoundFont for music is copied from assets/soundfonts/ if it's there (it isn't part
14
- * of the repository); without it, games play silently.
13
+ * The SoundFont for music (GeneralUser-GS.sf2) is copied from the game's assets/soundfonts/,
14
+ * or else this repository's, if it's there (it isn't part of either repository: a game's
15
+ * publishing workflow fetches it); without it, games play silently.
15
16
  */
16
17
  const ROOT = resolve(import.meta.dirname, "../..");
17
18
  const VIEWER = join(ROOT, "apps/viewer");
18
- const SOUNDFONT = join(ROOT, "assets/soundfonts/GeneralUser-GS.sf2");
19
+ const SOUNDFONT = "assets/soundfonts/GeneralUser-GS.sf2";
19
20
  export async function buildSite(gameDir, outDir, options = {}) {
20
21
  const out = resolve(outDir);
21
22
  // Whose Markdown becomes the pages: this repository's, or the game's own.
@@ -40,9 +41,10 @@ export async function buildSite(gameDir, outDir, options = {}) {
40
41
  writeFileSync(join(play, "game", name), data);
41
42
  // What the player lists in place of the dev server's directory listings.
42
43
  writeFileSync(join(play, "game/files.json"), JSON.stringify({ "": Object.keys(files) }));
43
- const soundFont = existsSync(SOUNDFONT);
44
- if (soundFont)
45
- cpSync(SOUNDFONT, join(play, "soundfonts", basename(SOUNDFONT)));
44
+ const sf2 = [join(resolve(gameDir), SOUNDFONT), join(ROOT, SOUNDFONT)].find((f) => existsSync(f));
45
+ const soundFont = sf2 !== undefined;
46
+ if (sf2)
47
+ cpSync(sf2, join(play, "soundfonts", basename(sf2)));
46
48
  // The pages.
47
49
  const sources = [
48
50
  ...["README.md", "CONTRIBUTING.md", "CHANGELOG.md"].filter((f) => existsSync(join(docs, f))),
@@ -11,12 +11,13 @@ import { markdown } from "./markdown.ts";
11
11
  * docs/... docs/**.md as pages, and their screenshots
12
12
  * play/play.html the player, with the game in play/game/
13
13
  *
14
- * The SoundFont for music is copied from assets/soundfonts/ if it's there (it isn't part
15
- * of the repository); without it, games play silently.
14
+ * The SoundFont for music (GeneralUser-GS.sf2) is copied from the game's assets/soundfonts/,
15
+ * or else this repository's, if it's there (it isn't part of either repository: a game's
16
+ * publishing workflow fetches it); without it, games play silently.
16
17
  */
17
18
  const ROOT = resolve(import.meta.dirname, "../..");
18
19
  const VIEWER = join(ROOT, "apps/viewer");
19
- const SOUNDFONT = join(ROOT, "assets/soundfonts/GeneralUser-GS.sf2");
20
+ const SOUNDFONT = "assets/soundfonts/GeneralUser-GS.sf2";
20
21
 
21
22
  export async function buildSite(
22
23
  gameDir: string,
@@ -46,8 +47,9 @@ export async function buildSite(
46
47
  for (const [name, data] of Object.entries(files)) writeFileSync(join(play, "game", name), data);
47
48
  // What the player lists in place of the dev server's directory listings.
48
49
  writeFileSync(join(play, "game/files.json"), JSON.stringify({ "": Object.keys(files) }));
49
- const soundFont = existsSync(SOUNDFONT);
50
- if (soundFont) cpSync(SOUNDFONT, join(play, "soundfonts", basename(SOUNDFONT)));
50
+ const sf2 = [join(resolve(gameDir), SOUNDFONT), join(ROOT, SOUNDFONT)].find((f) => existsSync(f));
51
+ const soundFont = sf2 !== undefined;
52
+ if (sf2) cpSync(sf2, join(play, "soundfonts", basename(sf2)));
51
53
 
52
54
  // The pages.
53
55
  const sources = [