Skip to content

Commit

Permalink
Revert "Embed js files until .net 6 is fixed dotnet/sdk#19482"
Browse files Browse the repository at this point in the history
This reverts commit 8185b2e.
  • Loading branch information
SonicGD committed Aug 12, 2021
1 parent 8185b2e commit f3f0b8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/Sitko.Blockly.Blazor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
wwwroot
Web/dist
16 changes: 6 additions & 10 deletions src/Sitko.Blockly.Blazor/Helpers/JsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

public class JsHelper
{
// TODO: .NET 6 Preview 7 sdk can't pack multiple files as static web assets. Return to static web assets when .NET 6 is fixed.
// TODO: Probably https://github.com/dotnet/sdk/pull/19482. Try in RC1.
public static ScriptInjectRequest TwitchScriptRequest { get; } = ScriptInjectRequest.FromResource(
public static ScriptInjectRequest TwitchScriptRequest { get; } = ScriptInjectRequest.FromUrl(
"blocklyTwitch",
typeof(JsHelper).Assembly,
"blocklyTwitch.js");
"/_content/Sitko.Blockly.Blazor/blocklyTwitch.js");

public static ScriptInjectRequest TwitterScriptRequest { get; } = ScriptInjectRequest.FromResource(
public static ScriptInjectRequest TwitterScriptRequest { get; } = ScriptInjectRequest.FromUrl(
"blocklyTwitter",
typeof(JsHelper).Assembly,
"blocklyTwitter.js");
"/_content/Sitko.Blockly.Blazor/blocklyTwitter.js");

public static ScriptInjectRequest FormsScriptRequest { get; } = ScriptInjectRequest.FromResource(
"blocklyForms", typeof(JsHelper).Assembly, "blocklyForms.js");
public static ScriptInjectRequest FormsScriptRequest { get; } = ScriptInjectRequest.FromUrl(
"blocklyForms", "/_content/Sitko.Blockly.Blazor/blocklyForms.js");
}
}
24 changes: 11 additions & 13 deletions src/Sitko.Blockly.Blazor/Sitko.Blockly.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Sitko.Blockly\Sitko.Blockly.csproj"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sitko.Blockly\Sitko.Blockly.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Sitko.Core.App.Blazor" Version="8.0.0-preview.54" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Sitko.Core.Blazor.FileUpload" Version="8.0.0-preview.54" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Sitko.Core.App.Blazor" Version="8.0.0-preview.54"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Sitko.Core.Blazor.FileUpload" Version="8.0.0-preview.54"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Web/dist/*.js"/>
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md"/>
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="\"/>
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Sitko.Blockly.Blazor/Web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config = {
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
path: path.resolve(__dirname, '..', 'wwwroot'),
}
};
module.exports = (env, argv) => {
Expand Down

0 comments on commit f3f0b8f

Please sign in to comment.