Skip to content

Commit

Permalink
RDEV-5995 Removed node dependency (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvesmiguel1 committed Oct 23, 2023
1 parent 0934500 commit a8b26ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
2 changes: 1 addition & 1 deletion ViewGenerator/ViewGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyTitle>ViewGenerator</AssemblyTitle>
<Product>ViewGenerator</Product>
<Description>Generates .NET View bindings from typescript</Description>
<Version>1.1.13</Version>
<Version>1.1.14</Version>
<PackageId>ViewGenerator</PackageId>
<PackageTags>Library</PackageTags>

Expand Down
28 changes: 1 addition & 27 deletions ViewGenerator/build/ViewGenerator.targets
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
<Project>
<PropertyGroup>

<CleanDependsOn>
VG_UnlinkNodeModules;
VG_CleanEntryFiles;
VG_CleanJSFiles;
VG_CleanCSSFiles;
VG_Clean;
$(CleanDependsOn);
</CleanDependsOn>
<NodeVersion>12.18.4</NodeVersion>
</PropertyGroup>

<ItemGroup>
<None Remove="**\*.cache"/>
</ItemGroup>

<Target Name="VG_SetVariables">
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<_ViewGeneratorNodeJsExe Include="$(MSBuildThisFileDirectory)..\..\..\Node.js.redist\$(NodeVersion)\tools\win-x64\node.exe"/>
<_ViewGeneratorNodeJsExe Include="$(MSBuildThisFileDirectory)..\..\Node.js.redist.$(NodeVersion)\tools\win-x64\node.exe"/>
</ItemGroup>
<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
<_ViewGeneratorNodeJsExe Include="$(MSBuildThisFileDirectory)..\..\..\Node.js.redist\$(NodeVersion)\tools\osx-x64\node"/>
<_ViewGeneratorNodeJsExe Include="$(MSBuildThisFileDirectory)..\..\Node.js.redist.$(NodeVersion)\tools\osx-x64\node"/>
</ItemGroup>
<ItemGroup>
<_ViewGeneratorCoreNodeJsExeAfterCheckedPaths Include="@(_ViewGeneratorCoreNodeJsExe)" Condition="Exists('%(FullPath)')" />
</ItemGroup>
<PropertyGroup>
<ViewGeneratorPath>$([System.IO.Path]::GetFullPath(&quot;$(MSBuildThisFileDirectory)..\&quot;))</ViewGeneratorPath>
<ViewGeneratorToolsPath>$(ViewGeneratorPath)tools</ViewGeneratorToolsPath>
<ViewGeneratorContentFilesPath>$(ViewGeneratorPath)contentFiles\</ViewGeneratorContentFilesPath>
<__ViewGeneratorNodeJsExe>@(_ViewGeneratorCoreNodeJsExeAfterCheckedPaths);</__ViewGeneratorNodeJsExe>
<ViewGeneratorNodeJsExe>$(__ViewGeneratorNodeJsExe.Substring(0, $(__ViewGeneratorNodeJsExe.IndexOf(';'))))</ViewGeneratorNodeJsExe>
</PropertyGroup>
</Target>

<Target Name="VG_LinkNodeModules" Condition="'$(PluginsRelativePath)' != '' and !Exists('$(ProjectDir)node_modules\webview.plugins')" >
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="mklink /J &quot;$(ProjectDir)node_modules\webview.plugins&quot; &quot;$(ProjectDir)$(PluginsRelativePath)node_modules&quot;" />
<!-- Take into account that ln -s takes the arguments in a different order from mklink e.g. first is destination and second is source -->
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="ln -s &quot;$(ProjectDir)$(PluginsRelativePath)node_modules&quot; &quot;$(ProjectDir)node_modules/webview.plugins&quot;" />
</Target>

<Target Name="VG_UnlinkNodeModules">
<RemoveDir Condition="Exists('$(ProjectDir)node_modules\webview.plugins')" Directories="$(ProjectDir)node_modules\webview.plugins" />
</Target>

<Target Name="VG_CleanEntryFiles" >
<ItemGroup>
<EntryFilesToDelete Include="**\*.entry" Exclude="node_modules\**\*.entry" />
Expand Down Expand Up @@ -125,7 +99,7 @@
</ItemGroup>

<!-- Webpack bundle generation targets-->
<Target Name="VG_GenerateBundle" Inputs="@(VG_Inputs);@(VG_Workers_Inputs)" Outputs="VG_Build.cache" Condition="'$(UsingMicrosoftNETSdk)' != 'true' Or '$(DesignTimeBuild)' != 'true'" AfterTargets="AfterResolveReferences" DependsOnTargets="VG_SetVariables;VG_SetupViewPacker;VG_LinkNodeModules;VG_Setup">
<Target Name="VG_GenerateBundle" Inputs="@(VG_Inputs);@(VG_Workers_Inputs)" Outputs="VG_Build.cache" Condition="'$(UsingMicrosoftNETSdk)' != 'true' Or '$(DesignTimeBuild)' != 'true'" AfterTargets="AfterResolveReferences" DependsOnTargets="VG_SetVariables;VG_SetupViewPacker;VG_Setup">
<CallTarget Targets="VG_GenerateBundleInner" />
</Target>

Expand Down

0 comments on commit a8b26ad

Please sign in to comment.