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

Remove the "CompileTypescript" from Windows #1173

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
9 changes: 8 additions & 1 deletion init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@ Write-Host "Restoring Monaco Editor"
ExecSafe { & $PSScriptRoot\tools\Restore-MonacoEditor.ps1 -RootFolder $PSScriptRoot }

Write-Host "Done."
Write-Output "---------------------------------------"
Write-Output "---------------------------------------"

# Install nodes modules
Write-Host "Installing node modules"
Get-ChildItem $PSScriptRoot\src\ -rec |? { $_.FullName.EndsWith('DevToys.Blazor.csproj') } |% {
Write-Host "Installing node modules for $($_)..."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doing this? We already do this on dotnet restore. See here:

<!-- Target ran on `dotnet restore -p:RestoreNpm=true` -->
<Target Name="NodeJsRestoreTarget" AfterTargets="_GenerateRestoreProjectSpec" Condition="$(RestoreNpm) == 'true'">
<!-- Verify that Node.JS is installed. -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<!-- Restore Node.JS dependencies. -->
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(ProjectDir)" Command="npm install" />
</Target>

ExecSafe { & npm install $_.Directory }
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"devtoys": "file:src/app/dev/DevToys.Blazor"
}
}
8 changes: 4 additions & 4 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<GirCore>0.5.0</GirCore>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CommunityToolkit.Common" Version="$(CommunityToolkitVersion)" />
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="$(CommunityToolkitVersion)" />
<PackageVersion Include="CommunityToolkit.Common" Version="8.2.2" />
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.2.2" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
Expand All @@ -24,7 +24,7 @@
<PackageVersion Include="Microsoft.Extensions.FileProviders.Abstractions" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="$(DotNetVersion)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.3.2" />
Expand All @@ -33,7 +33,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NuGet.Packaging" Version="6.9.1" />
<PackageVersion Include="Nuke.Common" Version="8.0.0" />
<PackageVersion Include="OneOf" Version="3.0.263" />
<PackageVersion Include="OneOf" Version="3.0.271" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageVersion Include="System.Text.Json" Version="$(DotNetVersion)" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
Expand Down
3 changes: 2 additions & 1 deletion src/app/dev/DevToys.Blazor/DevToys.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<RootNamespace>DevToys.Blazor</RootNamespace>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<TypeScriptTarget>ES6</TypeScriptTarget>
</PropertyGroup>

<!-- Only needed on Mac? -->
<PropertyGroup Condition="$(DefineConstants) == '__MACOS__'">
<PrepareForBuildDependsOn>CompileTypeScript;GetTypeScriptOutputForPublishing;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
</PropertyGroup>

Expand Down
Loading