rescript-relay 0.0.0-test-rust-compiler-8db81763 → 0.0.0-test-rust-compiler-cc037019
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/compiler.js +11 -0
- package/package.json +3 -3
- package/postinstall.js +17 -8
- /package/{relay-compiler-linux → relay-compiler-linux-x64}/relay +0 -0
- /package/{relay-compiler-darwin-arm64 → relay-compiler-macos-arm64}/relay +0 -0
- /package/{relay-compiler-darwin-x64 → relay-compiler-macos-x64}/relay +0 -0
package/compiler.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var spawn = require("child_process").spawn;
|
|
5
|
+
var path = require("path");
|
|
6
|
+
|
|
7
|
+
var input = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
spawn(path.join(__dirname, "rescript-relay-compiler.exe"), input, {
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
}).on("exit", process.exit);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rescript-relay",
|
|
3
|
-
"version": "0.0.0-test-rust-compiler-
|
|
3
|
+
"version": "0.0.0-test-rust-compiler-cc037019",
|
|
4
4
|
"main": "src/RescriptRelay.res",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Gabriel Nordeborn",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"rescript"
|
|
21
21
|
],
|
|
22
22
|
"bin": {
|
|
23
|
-
"rescript-relay-compiler": "
|
|
23
|
+
"rescript-relay-compiler": "compiler.js",
|
|
24
24
|
"rescript-relay-cli": "cli/cli.js"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "rescript build -with-deps",
|
|
28
|
-
"build:test": "./build-compiler-dev.sh && ./relay-compiler",
|
|
28
|
+
"build:test": "./build-compiler-dev.sh && ./rescript-relay-compiler",
|
|
29
29
|
"postinstall": "node postinstall.js",
|
|
30
30
|
"test": "jest",
|
|
31
31
|
"test:ci": "jest --ci --runInBand"
|
package/postinstall.js
CHANGED
|
@@ -14,14 +14,14 @@ var platform = process.platform;
|
|
|
14
14
|
|
|
15
15
|
function getRelayCompilerPlatformSuffix() {
|
|
16
16
|
if (process.platform === "darwin" && process.arch === "x64") {
|
|
17
|
-
return "
|
|
17
|
+
return "macos-x64";
|
|
18
18
|
} else if (process.platform === "darwin" && process.arch === "arm64") {
|
|
19
|
-
return "
|
|
19
|
+
return "macos-arm64";
|
|
20
20
|
} else if (process.platform === "linux" && process.arch === "x64") {
|
|
21
21
|
return "linux-x64";
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
return "linux-
|
|
24
|
+
return "linux-x64";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -110,17 +110,26 @@ function copyPlatformBinaries(platform) {
|
|
|
110
110
|
"relay-compiler-" + getRelayCompilerPlatformSuffix(),
|
|
111
111
|
"relay"
|
|
112
112
|
),
|
|
113
|
-
path.join(__dirname, "relay-compiler")
|
|
113
|
+
path.join(__dirname, "rescript-relay-compiler.exe")
|
|
114
114
|
);
|
|
115
|
-
fs.chmodSync(path.join(__dirname, "relay-compiler"), 0777);
|
|
115
|
+
fs.chmodSync(path.join(__dirname, "rescript-relay-compiler.exe"), 0777);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
function removeInitialBinaries() {
|
|
119
119
|
fs.unlinkSync(path.join(__dirname, "ppx-darwin"));
|
|
120
120
|
fs.unlinkSync(path.join(__dirname, "ppx-linux"));
|
|
121
|
-
fs.
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
fs.rmSync(path.join(__dirname, "relay-compiler-linux-x64"), {
|
|
122
|
+
recursive: true,
|
|
123
|
+
force: true,
|
|
124
|
+
});
|
|
125
|
+
fs.rmSync(path.join(__dirname, "relay-compiler-macos-x64"), {
|
|
126
|
+
recursive: true,
|
|
127
|
+
force: true,
|
|
128
|
+
});
|
|
129
|
+
fs.rmSync(path.join(__dirname, "relay-compiler-macos-arm64"), {
|
|
130
|
+
recursive: true,
|
|
131
|
+
force: true,
|
|
132
|
+
});
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
switch (platform) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|