libdragon 12.0.0 → 12.0.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/README.md CHANGED
@@ -6,7 +6,7 @@ This is a wrapper for a docker container to make managing the libdragon toolchai
6
6
 
7
7
  ## Prerequisites
8
8
 
9
- You should have [docker](https://www.docker.com/products/docker-desktop) (`>= 27.2.0`) && [git](https://git-scm.com/downloads) installed on your system.
9
+ You should have [docker](https://www.docker.com/products/docker-desktop) (`>= 27.2.0`) and [git](https://git-scm.com/downloads) installed on your system.
10
10
 
11
11
  ## Installation
12
12
 
@@ -289,6 +289,17 @@ To create your own dev container backed project, you can use the contents of the
289
289
  - It will prepare the container and open it in the editor.
290
290
  </details>
291
291
 
292
+ ## As an NPM dependency
293
+
294
+ You can install libdragon as an NPM dependency by `npm install libdragon --save` in order to use docker in your N64 projects. A `libdragon` command similar to global installation is provided that can be used in your NPM scripts as follows;
295
+ ```json
296
+ "scripts": {
297
+ "prepare": "libdragon init"
298
+ "build": "libdragon make",
299
+ "clean": "libdragon make clean"
300
+ }
301
+ ```
302
+
292
303
  ## Funding
293
304
 
294
305
  If this tool helped you, consider supporting its development by sponsoring it!
@@ -58,7 +58,16 @@ const initContainer = async (libdragonInfo) => {
58
58
  '-R',
59
59
  `${uid >= 0 ? uid : ''}:${gid >= 0 ? gid : ''}`,
60
60
  '/n64_toolchain',
61
- ]
61
+ ],
62
+ {
63
+ userCommand: false,
64
+ inheritStdin: true,
65
+ inheritStdout: false,
66
+ inheritStderr: false,
67
+ spawnOptions: {
68
+ shell: true,
69
+ },
70
+ }
62
71
  );
63
72
  } catch (e) {
64
73
  // Dispose the invalid container, clean and exit
@@ -188,7 +188,6 @@ function spawnProcess(
188
188
  // Prevent the annoying docker "What's next?" message. It messes up everything.
189
189
  DOCKER_CLI_HINTS: 'false',
190
190
  },
191
- shell: true,
192
191
  ...spawnOptions,
193
192
  });
194
193
 
package/modules/utils.js CHANGED
@@ -40,7 +40,16 @@ const installDependencies = async (libdragonInfo) => {
40
40
  CONTAINER_TARGET_PATH + '/' + libdragonInfo.vendorDirectory,
41
41
  ...dockerHostUserParams(libdragonInfo),
42
42
  ],
43
- ['/bin/bash', './build.sh']
43
+ ['/bin/bash', './build.sh'],
44
+ {
45
+ userCommand: false,
46
+ inheritStdin: true,
47
+ inheritStdout: false,
48
+ inheritStderr: false,
49
+ spawnOptions: {
50
+ shell: true,
51
+ },
52
+ }
44
53
  );
45
54
  };
46
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libdragon",
3
- "version": "12.0.0",
3
+ "version": "12.0.1",
4
4
  "description": "This is a docker wrapper for libdragon",
5
5
  "main": "index.js",
6
6
  "engines": {