@lamppost/create-ink-player 1.0.1 → 1.0.4

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/index.js CHANGED
@@ -79,6 +79,10 @@ async function main() {
79
79
  console.log("Copying template files...");
80
80
  cpSync(templateDir, targetDir, { recursive: true });
81
81
 
82
+ // Copy over .gitignore file
83
+ const gitignorePath = join(templateDir, ".gitignore");
84
+ cpSync(gitignorePath, join(targetDir, ".gitignore"));
85
+
82
86
  // Delete the node_modules directory, if it exists
83
87
  if (existsSync(join(targetDir, "node_modules"))) {
84
88
  rmSync(join(targetDir, "node_modules"), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lamppost/create-ink-player",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,15 +9,16 @@
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/jeresig/lamppost-player.git"
12
+ "url": "https://github.com/lamppostprojects/ink-player.git"
13
13
  },
14
- "homepage": "https://github.com/jeresig/lamppost-player",
14
+ "homepage": "https://github.com/lamppostprojects/ink-player",
15
15
  "keywords": [
16
16
  "ink",
17
17
  "inkjs",
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
  }
@@ -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 screen entirely by updating `src/index.ts`).
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
 
@@ -9,7 +9,7 @@
9
9
  "preview": "rsbuild preview"
10
10
  },
11
11
  "dependencies": {
12
- "@lamppost/ink-player": "^1.0.3",
12
+ "@lamppost/ink-player": "^2.0.2",
13
13
  "preact": "^10.27.1",
14
14
  "react-bootstrap": "^2.10.10"
15
15
  },
@@ -14,8 +14,8 @@ importers:
14
14
  .:
15
15
  dependencies:
16
16
  '@lamppost/ink-player':
17
- specifier: ^1.0.2
18
- version: 1.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)
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@1.0.2':
147
- resolution: {integrity: sha512-TPQ7OIybhEEeEdHB3y85C+Og9EVeg4HDjD1jz/29xVKmOY0Z2bVm2AMCdiDs4aWJo29+lrcLh/chs87Hvq2cDg==}
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@1.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)':
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
@@ -1,16 +1,16 @@
1
- import type { ScreenProps } from "@lamppost/ink-player";
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 screen
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 screen.
11
+ * Use setPage("game") to navigate to the game page.
12
12
  */
13
- export function About({ setPage, loading }: ScreenProps) {
13
+ export function About({ setPage, loading }: PageProps) {
14
14
  return (
15
15
  <Card>
16
16
  {/*
@@ -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 screens to display in the game. The only required screen is "Game".
64
+ * The pages to display in the game. The only required page is "Game".
71
65
  */
72
- screens: [
66
+ pages: [
73
67
  {
74
68
  id: "home",
75
69
  title: "Home",
@@ -96,5 +90,10 @@ init({
96
90
  * import locationPlugin from "@lamppost/ink-player/plugins/location";
97
91
  * plugins: [textInputPlugin({}), locationPlugin({})],
98
92
  */
99
- plugins: [textInputPlugin({}), locationPlugin({})],
93
+ plugins: [
94
+ textInputPlugin({}),
95
+ locationPlugin({}),
96
+ historyPlugin({}),
97
+ darkModePlugin({}),
98
+ ],
100
99
  });