Skip to content

Commit fd21e87

Browse files
committed
chore: Adjust more linting
1 parent f14c957 commit fd21e87

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

doc/features-additional-files.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Exclusions:
3939

4040
1. Files in the `WasmScript` folder will be set as `UnoDeploy="None"` by default (they are not treat as content)
4141

42-
2. Files in the `wwwroot` folder will be set as `UnoDeploy="Root"` by default
42+
1. Files in the `wwwroot` folder will be set as `UnoDeploy="Root"` by default
4343

44-
3. You can manually set the _deploy mode_ in the `.csproj` in the following way:
44+
1. You can manually set the _deploy mode_ in the `.csproj` in the following way:
4545

4646
```xml
4747
<ItemGroup>
@@ -58,9 +58,9 @@ Exclusions:
5858

5959
1. A few files extensions are excluded (`UnoDeploy="None")`by default such as `*.a`, `*.o`. `.html` files are those named `web.config` will default to `UnoDeploy="Root"`.
6060

61-
### Asset dictionary
61+
### Asset dictionary
6262

63-
The file `wwwroot/package_XXX/uno-assets.txt` contains the package relative paths of the content files that were copied to the `wwwroot` folder.
63+
The file `wwwroot/package_XXX/uno-assets.txt` contains the package relative paths of the content files that were copied to the `wwwroot` folder.
6464

6565
It can be used to identify which assets are packaged with the application at runtime and avoid costly probing operations.
6666

src/Uno.Wasm.Bootstrap/GenerateUnoAssetsManifestTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public override bool Execute()
6464
{
6565
// Remove the original path OutputPackagePath from the path to keep
6666
// net8 compatibility.
67-
sanitizedAssetPath.Substring(OutputPackagePath.Length + 1);
67+
sanitizedAssetPath = sanitizedAssetPath.Substring(OutputPackagePath.Length + 1);
6868
}
6969

7070
assets.Add(sanitizedAssetPath);

src/Uno.Wasm.Sample/sample.common.props

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,14 @@
5656
<Output TaskParameter="Lines" ItemName="_UnoAssetsLines"/>
5757
</ReadLinesFromFile>
5858

59+
<ItemGroup>
60+
<_InvalidAssetLines Include="@(_UnoAssetsLines)"
61+
Condition="$([System.String]::Copy('%(Identity)').StartsWith('package_'))" />
62+
</ItemGroup>
63+
5964
<!-- Fail if any _UnoAssetsLines item contains the string `package_` -->
60-
<Error Condition="$([System.String]::Copy('%(FullPath)').StartsWith('package_'))"
61-
Message="No asset should start with 'package_'" />
65+
<Error Condition=" '@(_InvalidAssetLines)' != ''"
66+
Text="No asset should start with 'package_'" />
6267

6368
<Message Importance="high" Text="Output dist validated" />
6469
</Target>

0 commit comments

Comments
 (0)