@isograph/compiler 0.0.0-main-275c374f

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.
Binary file
package/cli.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ var bin = require(".");
4
+ var spawn = require("child_process").spawn;
5
+
6
+ var input = process.argv.slice(2);
7
+
8
+ if (bin !== null) {
9
+ spawn(bin, input, { stdio: "inherit" }).on("exit", process.exit);
10
+ } else {
11
+ throw new Error(
12
+ `Platform "${process.platform} (${process.arch})" not supported.`
13
+ );
14
+ }
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ const path = require("path");
4
+
5
+ let binary;
6
+ if (process.platform === "darwin" && process.arch === "x64") {
7
+ binary = path.join(__dirname, "macos-x64", "isograph_cli");
8
+ } else if (process.platform === "darwin" && process.arch === "arm64") {
9
+ binary = path.join(__dirname, "macos-arm64", "isograph_cli");
10
+ } else if (process.platform === "linux" && process.arch === "x64") {
11
+ throw new Error("Platform not supported yet");
12
+ // binary = path.join(__dirname, "linux-x64", "isograph_cli");
13
+ } else if (process.platform === "linux" && process.arch === "arm64") {
14
+ throw new Error("Platform not supported yet");
15
+ // binary = path.join(__dirname, "linux-arm64", "isograph_cli");
16
+ } else if (process.platform === "win32" && process.arch === "x64") {
17
+ throw new Error("Platform not supported yet");
18
+ // binary = path.join(__dirname, "win-x64", "isograph_cli.exe");
19
+ } else {
20
+ throw new Error("Platform not supported yet");
21
+ // binary = null;
22
+ }
23
+
24
+ module.exports = binary;
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@isograph/compiler",
3
+ "version": "0.0.0-main-275c374f",
4
+ "description": "Isograph compiler",
5
+ "main": "index.js",
6
+ "author": "Isograph Labs",
7
+ "license": "MIT",
8
+ "scripts": {}
9
+ }