Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: install npm PowerShell scripts on Windows #52009

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tools/msvs/msi/nodemsi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@
Description="!(loc.npm_Description)">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmPowerShellScript"/>
<ComponentRef Id="NpxCmdScript"/>
<ComponentRef Id="NpxBashScript"/>
<ComponentRef Id="NpxPowerShellScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentRef Id="SetInstallDirPermission" />
<ComponentGroupRef Id="NpmSourceFiles"/>
Expand Down Expand Up @@ -224,6 +226,10 @@
<File Id="npm.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm"/>
</Component>

<Component Id="NpmPowerShellScript">
<File Id="npm.ps1" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npm.ps1"/>
</Component>

<Component Id="NpxCmdScript">
<File Id="npx.cmd" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npx.cmd"/>
</Component>
Expand All @@ -232,6 +238,10 @@
<File Id="npx.sh" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npx"/>
</Component>

<Component Id="NpxPowerShellScript">
<File Id="npx.ps1" KeyPath="yes" Source="$(var.NpmSourceDir)\bin\npx.ps1"/>
</Component>

<Directory Id="NodeModulesFolder" Name="node_modules">
<Directory Id="NpmFolder" Name="npm">
<Component Id="NpmConfigurationFile">
Expand Down
4 changes: 4 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ if not defined nonpm (
if errorlevel 1 echo Cannot copy npx && goto package_error
copy /Y ..\deps\npm\bin\npx.cmd %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy npx.cmd && goto package_error
copy /Y ..\deps\npm\bin\npm.ps1 %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy npm.ps1 && goto package_error
copy /Y ..\deps\npm\bin\npx.ps1 %TARGET_NAME%\ > nul
if errorlevel 1 echo Cannot copy npx.ps1 && goto package_error
)

if not defined nocorepack (
Expand Down
Loading