Skip to content

Commit

Permalink
Add rescript-editor-analysis and rescript-tools to rescript npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Nov 2, 2024
1 parent b547729 commit f62ea80
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
27 changes: 21 additions & 6 deletions cli/bin_path.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ts-check

var path = require("path");
const path = require("path");

/**
* @type{string}
Expand All @@ -11,7 +11,7 @@ var path = require("path");
* Also, we do not have Windows ARM binaries yet. But the x64 binaries do work on Windows 11 ARM.
* So omit the architecture for Windows, too.
*/
var binDirName =
const binDirName =
process.arch === "x64" || process.platform === "win32"
? process.platform
: process.platform + process.arch;
Expand All @@ -20,25 +20,40 @@ var binDirName =
*
* @type{string}
*/
var binAbsolutePath = path.join(__dirname, "..", binDirName);
const binAbsolutePath = path.join(__dirname, "..", binDirName);

/**
* @type{string}
*/
var bsc_exe = path.join(binAbsolutePath, "bsc.exe");
const bsc_exe = path.join(binAbsolutePath, "bsc.exe");

/**
* @type{string}
*/
var ninja_exe = path.join(binAbsolutePath, "ninja.exe");
const ninja_exe = path.join(binAbsolutePath, "ninja.exe");

/**
* @type{string}
*/
var rescript_exe = path.join(binAbsolutePath, "rescript.exe");
const rescript_exe = path.join(binAbsolutePath, "rescript.exe");

/**
* @type{string}
*/
const rescript_tools_exe = path.join(binAbsolutePath, "rescript-tools.exe");

/**
* @type{string}
*/
const rescript_editor_analysis_exe = path.join(
binAbsolutePath,
"rescript-editor-analysis.exe",
);

exports.dirName = binDirName;
exports.absolutePath = binAbsolutePath;
exports.bsc_exe = bsc_exe;
exports.ninja_exe = ninja_exe;
exports.rescript_exe = rescript_exe;
exports.rescript_tools_exe = rescript_tools_exe;
exports.rescript_editor_analysis_exe = rescript_editor_analysis_exe;
10 changes: 10 additions & 0 deletions packages/artifacts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ cli/rewatch
darwin/bsb_helper.exe
darwin/bsc.exe
darwin/ninja.exe
darwin/rescript-editor-analysis.exe
darwin/rescript-tools.exe
darwin/rescript.exe
darwin/rewatch.exe
darwinarm64/bsb_helper.exe
darwinarm64/bsc.exe
darwinarm64/ninja.exe
darwinarm64/rescript-editor-analysis.exe
darwinarm64/rescript-tools.exe
darwinarm64/rescript.exe
darwinarm64/rewatch.exe
docs/docson/build-schema.json
Expand Down Expand Up @@ -1188,17 +1192,23 @@ lib/ocaml/WeakSet.res
linux/bsb_helper.exe
linux/bsc.exe
linux/ninja.exe
linux/rescript-editor-analysis.exe
linux/rescript-tools.exe
linux/rescript.exe
linux/rewatch.exe
linuxarm64/bsb_helper.exe
linuxarm64/bsc.exe
linuxarm64/ninja.exe
linuxarm64/rescript-editor-analysis.exe
linuxarm64/rescript-tools.exe
linuxarm64/rescript.exe
linuxarm64/rewatch.exe
ninja.COPYING
package.json
win32/bsb_helper.exe
win32/bsc.exe
win32/ninja.exe
win32/rescript-editor-analysis.exe
win32/rescript-tools.exe
win32/rescript.exe
win32/rewatch.exe
2 changes: 2 additions & 0 deletions scripts/copyExes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function copyExe(dir, exe) {

if (process.argv.includes("-all") || process.argv.includes("-compiler")) {
copyExe(duneBinDir, "rescript");
copyExe(duneBinDir, "rescript-editor-analysis");
copyExe(duneBinDir, "rescript-tools");
copyExe(duneBinDir, "bsc");
copyExe(duneBinDir, "bsb_helper");
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/npmPack.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ function getFilesAddedByCI() {
"bsc.exe",
"ninja.exe",
"rescript.exe",
"rescript-editor-analysis.exe",
"rescript-tools.exe",
"rewatch.exe",
];

Expand Down

0 comments on commit f62ea80

Please sign in to comment.