gemshell 0.0.0-stage → 1.2.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.

Potentially problematic release.


This version of gemshell might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,3 +1,18 @@
1
- # Temporary Holding Version
1
+ # GemShell
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Package HTML5 games as desktop apps for Windows, macOS and Linux, and ship them to Steam, itch.io and GitHub, from a terminal or a CI pipeline.
4
+
5
+ ```bash
6
+ npm install -g gemshell
7
+ gemshell new mygame
8
+ cd mygame
9
+ gemshell build
10
+ ```
11
+
12
+ Or without installing anything: `npx gemshell build`.
13
+
14
+ A game you already have is set up with `gemshell init`. `gemshell help` lists every command, and `gemshell help <command>` explains one.
15
+
16
+ Everything else is in the docs: **https://gemshell.dev/guide/command-line**
17
+
18
+ Deploying, mobile builds and plugins are GemShell Pro: **https://l0om.itch.io/gemshell**
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ // The gemshell command, from npm.
3
+ //
4
+ // GemShell is one native program per system. npm installs only the package
5
+ // that fits this machine, through optionalDependencies that each name an os
6
+ // and a cpu, and this starts the program out of it with everything passed
7
+ // through: the arguments, the terminal, the exit code.
8
+ 'use strict';
9
+
10
+ const { spawn } = require('child_process');
11
+
12
+ const pkg = `@gemshell/${process.platform}-${process.arch}`;
13
+ const exe = process.platform === 'win32' ? 'gemshell.exe' : 'gemshell';
14
+
15
+ let bin;
16
+ try {
17
+ bin = require.resolve(`${pkg}/bin/${exe}`);
18
+ } catch {
19
+ const known = ['darwin-arm64', 'darwin-x64', 'win32-x64', 'linux-x64', 'linux-arm64'];
20
+ if (known.includes(`${process.platform}-${process.arch}`)) {
21
+ console.error(`gemshell: ${pkg} is missing, which happens when optional packages are ` +
22
+ `left out. Install again without --no-optional or --omit=optional.`);
23
+ } else {
24
+ console.error(`gemshell: there is no GemShell for ${process.platform} ${process.arch}. ` +
25
+ `It runs on macOS, Windows x64 and Linux x64 and arm64.`);
26
+ }
27
+ process.exit(1);
28
+ }
29
+
30
+ const child = spawn(bin, process.argv.slice(2), { stdio: 'inherit' });
31
+ // Ctrl-C reaches GemShell itself, which stops a build or a deploy cleanly;
32
+ // this waits for it rather than leaving it running behind the prompt.
33
+ for (const sig of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
34
+ process.on(sig, () => {});
35
+ }
36
+ child.on('error', (err) => {
37
+ console.error(`gemshell: ${err.message}`);
38
+ process.exit(1);
39
+ });
40
+ child.on('exit', (code, signal) => {
41
+ if (signal) {
42
+ process.removeAllListeners(signal);
43
+ process.kill(process.pid, signal);
44
+ return;
45
+ }
46
+ process.exit(code ?? 1);
47
+ });
package/package.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "gemshell",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.2.0",
4
+ "description": "Package HTML5 games as desktop apps for Windows, macOS and Linux, and ship them to Steam, itch.io and GitHub.",
5
+ "homepage": "https://gemshell.dev/guide/command-line",
6
+ "license": "UNLICENSED",
7
+ "keywords": [
8
+ "html5",
9
+ "game",
10
+ "electron",
11
+ "steam",
12
+ "itch.io",
13
+ "desktop",
14
+ "packager",
15
+ "cli"
16
+ ],
17
+ "bin": {
18
+ "gemshell": "bin/gemshell.js"
19
+ },
20
+ "engines": {
21
+ "node": ">=16"
22
+ },
23
+ "optionalDependencies": {
24
+ "@gemshell/darwin-arm64": "1.2.0",
25
+ "@gemshell/darwin-x64": "1.2.0",
26
+ "@gemshell/win32-x64": "1.2.0",
27
+ "@gemshell/linux-x64": "1.2.0",
28
+ "@gemshell/linux-arm64": "1.2.0"
29
+ }
30
+ }