@lamppost/create-ink-player 1.0.3 → 1.0.5
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/package.json +7 -2
- package/template/README.md +1 -1
- package/template/package.json +1 -1
- package/template/pnpm-lock.yaml +5 -5
- package/template/src/About.tsx +4 -4
- package/template/src/index.ts +12 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lamppost/create-ink-player",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"interactive fiction",
|
|
19
19
|
"game"
|
|
20
20
|
],
|
|
21
|
+
"type": "module",
|
|
21
22
|
"main": "./index.js",
|
|
22
23
|
"bin": {
|
|
23
24
|
"create-ink-player": "./index.js"
|
|
@@ -29,5 +30,9 @@
|
|
|
29
30
|
"README.md",
|
|
30
31
|
"LICENSE"
|
|
31
32
|
],
|
|
32
|
-
"dependencies": {}
|
|
33
|
+
"dependencies": {},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"update-template": "./update-template.js",
|
|
36
|
+
"changeset": "pnpm -w changeset"
|
|
37
|
+
}
|
|
33
38
|
}
|
package/template/README.md
CHANGED
|
@@ -7,7 +7,7 @@ This is a web player for running [Ink](https://github.com/inkle/ink) stories cre
|
|
|
7
7
|
* Run `pnpm dev` to see the result in your browser and confirm that things are running correctly.
|
|
8
8
|
* Open up `story/game.ink` in the Inky editor and make modifications, go back to your game in the browser and see your changes live!
|
|
9
9
|
* Update the settings in `src/index.tsx` to use your game name and update any other settings.
|
|
10
|
-
* Update the About page in `src/About.tsx` to include some information about your game (or remove that
|
|
10
|
+
* Update the About page in `src/About.tsx` to include some information about your game (or remove that page entirely by updating `src/index.ts`).
|
|
11
11
|
* Add any custom CSS styling inside the `src/styles.scss` file.
|
|
12
12
|
* Run `pnpm build` to create the final HTML/JS/CSS/Image files needed to display the game. The files will be output to the `dist/` directory. You can then bundle them or upload them to the location of your choice.
|
|
13
13
|
|
package/template/package.json
CHANGED
package/template/pnpm-lock.yaml
CHANGED
|
@@ -14,8 +14,8 @@ importers:
|
|
|
14
14
|
.:
|
|
15
15
|
dependencies:
|
|
16
16
|
'@lamppost/ink-player':
|
|
17
|
-
specifier: ^
|
|
18
|
-
version:
|
|
17
|
+
specifier: ^2.0.2
|
|
18
|
+
version: 2.0.2(@popperjs/core@2.11.8)(@types/react@19.2.9)(react-dom@19.2.3(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)
|
|
19
19
|
preact:
|
|
20
20
|
specifier: ^10.27.1
|
|
21
21
|
version: 10.28.2
|
|
@@ -143,8 +143,8 @@ packages:
|
|
|
143
143
|
'@jridgewell/trace-mapping@0.3.31':
|
|
144
144
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
145
145
|
|
|
146
|
-
'@lamppost/ink-player@
|
|
147
|
-
resolution: {integrity: sha512-
|
|
146
|
+
'@lamppost/ink-player@2.0.2':
|
|
147
|
+
resolution: {integrity: sha512-vCCRD83uzsWIUfHwLZJkqoL7i7W9t4i/hlmNiixsBFocIfkxrq/Nt3vF6RYnDCICV8ZQ3XVjOd4u2Ptd80OJpg==}
|
|
148
148
|
|
|
149
149
|
'@module-federation/error-codes@0.22.0':
|
|
150
150
|
resolution: {integrity: sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==}
|
|
@@ -1312,7 +1312,7 @@ snapshots:
|
|
|
1312
1312
|
'@jridgewell/resolve-uri': 3.1.2
|
|
1313
1313
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
1314
1314
|
|
|
1315
|
-
'@lamppost/ink-player@
|
|
1315
|
+
'@lamppost/ink-player@2.0.2(@popperjs/core@2.11.8)(@types/react@19.2.9)(react-dom@19.2.3(react@19.0.0-rc-fb9a90fa48-20240614))(react@19.0.0-rc-fb9a90fa48-20240614)':
|
|
1316
1316
|
dependencies:
|
|
1317
1317
|
bootstrap: 5.3.8(@popperjs/core@2.11.8)
|
|
1318
1318
|
bootstrap-icons: 1.13.1
|
package/template/src/About.tsx
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PageProps } from "@lamppost/ink-player";
|
|
2
2
|
import Button from "react-bootstrap/Button";
|
|
3
3
|
import Card from "react-bootstrap/Card";
|
|
4
4
|
import Spinner from "react-bootstrap/Spinner";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The component is provided with the following props:
|
|
8
|
-
* - setPage: A function to navigate to a different
|
|
8
|
+
* - setPage: A function to navigate to a different page
|
|
9
9
|
* - loading: A boolean indicating if the game is loading
|
|
10
10
|
*
|
|
11
|
-
* Use setPage("game") to navigate to the game
|
|
11
|
+
* Use setPage("game") to navigate to the game page.
|
|
12
12
|
*/
|
|
13
|
-
export function About({ setPage, loading }:
|
|
13
|
+
export function About({ setPage, loading }: PageProps) {
|
|
14
14
|
return (
|
|
15
15
|
<Card>
|
|
16
16
|
{/*
|
package/template/src/index.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { init } from "@lamppost/ink-player";
|
|
2
2
|
import locationPlugin from "@lamppost/ink-player/plugins/location";
|
|
3
3
|
import textInputPlugin from "@lamppost/ink-player/plugins/text-input";
|
|
4
|
+
import historyPlugin from "@lamppost/ink-player/plugins/history";
|
|
5
|
+
import darkModePlugin from "@lamppost/ink-player/plugins/dark-mode";
|
|
4
6
|
|
|
5
7
|
import "@lamppost/ink-player/styles.css";
|
|
6
8
|
import "./styles.scss";
|
|
@@ -27,14 +29,6 @@ init({
|
|
|
27
29
|
*/
|
|
28
30
|
// shortGameName: "LampPost Player",
|
|
29
31
|
|
|
30
|
-
/**
|
|
31
|
-
* Whether to enable dark mode. If not provided, dark mode will not be
|
|
32
|
-
* enabled. If enabled, it will turn on the toggle in the header,
|
|
33
|
-
* load the user's preference from their computer, and store the result
|
|
34
|
-
* in the browser's local storage.
|
|
35
|
-
*/
|
|
36
|
-
// enableDarkMode: false,
|
|
37
|
-
|
|
38
32
|
/**
|
|
39
33
|
* The default theme to use. If not provided, the default theme will be
|
|
40
34
|
* "light".
|
|
@@ -67,9 +61,9 @@ init({
|
|
|
67
61
|
// stickyTags: ["Portrait", "Location", "BackgroundMusic"],
|
|
68
62
|
|
|
69
63
|
/**
|
|
70
|
-
* The
|
|
64
|
+
* The pages to display in the game. The only required page is "Game".
|
|
71
65
|
*/
|
|
72
|
-
|
|
66
|
+
pages: [
|
|
73
67
|
{
|
|
74
68
|
id: "home",
|
|
75
69
|
title: "Home",
|
|
@@ -78,12 +72,12 @@ init({
|
|
|
78
72
|
{
|
|
79
73
|
id: "game",
|
|
80
74
|
title: "Story",
|
|
81
|
-
component: "
|
|
75
|
+
component: "game",
|
|
82
76
|
},
|
|
83
77
|
{
|
|
84
78
|
id: "history",
|
|
85
79
|
title: "History",
|
|
86
|
-
component: "
|
|
80
|
+
component: "history",
|
|
87
81
|
},
|
|
88
82
|
],
|
|
89
83
|
|
|
@@ -96,5 +90,10 @@ init({
|
|
|
96
90
|
* import locationPlugin from "@lamppost/ink-player/plugins/location";
|
|
97
91
|
* plugins: [textInputPlugin({}), locationPlugin({})],
|
|
98
92
|
*/
|
|
99
|
-
plugins: [
|
|
93
|
+
plugins: [
|
|
94
|
+
textInputPlugin({}),
|
|
95
|
+
locationPlugin({}),
|
|
96
|
+
historyPlugin({}),
|
|
97
|
+
darkModePlugin({}),
|
|
98
|
+
],
|
|
100
99
|
});
|