Skip to content

Commit

Permalink
tools: refactor license2rtf.js to esm module
Browse files Browse the repository at this point in the history
  • Loading branch information
F3n67u committed May 14, 2022
1 parent 556df3d commit 842ed14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -1096,7 +1096,7 @@ endif
$(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx
$(NODE) tools/license2rtf.js < LICENSE > \
$(NODE) tools/license2rtf.mjs < LICENSE > \
$(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf
cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources
pkgbuild --version $(FULLVERSION) \
Expand Down
7 changes: 3 additions & 4 deletions tools/license2rtf.js → tools/license2rtf.mjs
@@ -1,7 +1,6 @@
'use strict';

const assert = require('assert');
const Stream = require('stream');
import assert from 'node:assert';
import Stream from 'node:stream';
import process from 'node:process';


/*
Expand Down
4 changes: 2 additions & 2 deletions vcbuild.bat
Expand Up @@ -420,9 +420,9 @@ if "%use_x64_node_exe%"=="true" (
set exit_code=1
goto exit
)
%x64_node_exe% tools\license2rtf.js < LICENSE > %config%\license.rtf
%x64_node_exe% tools\license2rtf.mjs < LICENSE > %config%\license.rtf
) else (
%node_exe% tools\license2rtf.js < LICENSE > %config%\license.rtf
%node_exe% tools\license2rtf.mjs < LICENSE > %config%\license.rtf
)

if errorlevel 1 echo Failed to generate license.rtf&goto exit
Expand Down

0 comments on commit 842ed14

Please sign in to comment.