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 +12 -1
- package/modules/actions/start.js +10 -1
- package/modules/helpers.js +0 -1
- package/modules/utils.js +10 -1
- package/package.json +1 -1
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`)
|
|
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!
|
package/modules/actions/start.js
CHANGED
|
@@ -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
|
package/modules/helpers.js
CHANGED
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
|
|