From 9c5c352ec599af4ac9b0bf54bbc29615d340173f Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Sat, 29 Jun 2024 07:01:38 +0900 Subject: [PATCH] avoid JS identifier --- packages/playground-bundling/scripts/generate_cmijs.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/playground-bundling/scripts/generate_cmijs.js b/packages/playground-bundling/scripts/generate_cmijs.js index 2dd3dd1799..5594414dea 100644 --- a/packages/playground-bundling/scripts/generate_cmijs.js +++ b/packages/playground-bundling/scripts/generate_cmijs.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +"use strict"; + /* * Requires the version matching `rescript` binary to be `npm link`ed in this * project. Or in other words: You need to build cmij files with the same @@ -78,22 +80,22 @@ function buildCompilerCmij() { } function buildThirdPartyCmijs() { - packages.forEach(function installLib(package) { + packages.forEach(function installLib(pkg) { const libOcamlFolder = path.join( PROJECT_ROOT_DIR, "node_modules", - package, + pkg, "lib", "ocaml" ); const libEs6Folder = path.join( PROJECT_ROOT_DIR, "node_modules", - package, + pkg, "lib", "es6" ); - const outputFolder = path.join(PACKAGES_DIR, package); + const outputFolder = path.join(PACKAGES_DIR, pkg); const cmijFile = path.join(outputFolder, `cmij.js`);