|
20 | 20 | </ItemGroup> |
21 | 21 |
|
22 | 22 | <ItemGroup> |
23 | | - <Content Remove="package-lock.json" /> |
24 | 23 | <Content Remove="package.json" /> |
25 | 24 | </ItemGroup> |
26 | 25 |
|
27 | 26 | <ItemGroup> |
28 | | - <None Include="package-lock.json" /> |
29 | 27 | <None Include="package.json" /> |
30 | 28 | </ItemGroup> |
31 | 29 |
|
32 | 30 | <ItemGroup> |
33 | 31 | <PackageReference Include="GoogleAnalytics.Blazor" Version="1.0.3" /> |
34 | | - <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.10" /> |
35 | | - <PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.10" /> |
| 32 | + <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" /> |
| 33 | + <PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.11" /> |
36 | 34 | <PackageReference Include="System.Net.Http.Json" Version="8.0.1" /> |
37 | 35 | </ItemGroup> |
38 | 36 |
|
|
43 | 41 | <UpToDateCheckOutput Include="@(OutputStaticAssetsStyles)" Set="Styles" /> |
44 | 42 | </ItemGroup> |
45 | 43 |
|
46 | | - <!-- |
| 44 | + |
47 | 45 | <ItemGroup> |
48 | 46 | <InputStaticAssetsScripts Include="scripts\*.ts" /> |
49 | 47 | <OutputStaticAssetsScripts Include="wwwroot\js\material.blazor.website.js;wwwroot\js\material.blazor.website.min.js" /> |
50 | | - --> |
| 48 | + |
51 | 49 | <!-- Keep this Remove/Include pair --> |
52 | | - <!-- |
| 50 | + |
53 | 51 | <Content Remove="@(OutputStaticAssetsScripts)" /> |
54 | 52 | <Content Include="@(OutputStaticAssetsScripts)" /> |
55 | 53 | </ItemGroup> |
56 | | - --> |
| 54 | + |
57 | 55 |
|
58 | 56 | <ItemGroup> |
59 | 57 | <InputStaticAssetsStyles Include="styles\*.scss;" /> |
|
67 | 65 | <ProjectReference Include="..\Material.Blazor\Material.Blazor.csproj" /> |
68 | 66 | </ItemGroup> |
69 | 67 |
|
70 | | - <Target Name="CheckIfNpmExists" BeforeTargets="PreBuildEvent"> |
| 68 | + <Target Name="CheckIfpnpmExists" BeforeTargets="PreBuildEvent"> |
71 | 69 | <Message Importance="high" Text="***** Building M.B.W" /> |
72 | | - <Exec Command="npm install" ContinueOnError="true" StandardOutputImportance="low" StandardErrorImportance="low" LogStandardErrorAsError="false" IgnoreExitCode="true"> |
73 | | - <Output TaskParameter="ExitCode" PropertyName="NpmReturnCode" /> |
| 70 | + <Exec Command="pnpm install" ContinueOnError="true" StandardOutputImportance="low" StandardErrorImportance="low" LogStandardErrorAsError="false" IgnoreExitCode="true"> |
| 71 | + <Output TaskParameter="ExitCode" PropertyName="pnpmReturnCode" /> |
74 | 72 | </Exec> |
75 | 73 | </Target> |
76 | 74 |
|
77 | | - <Target Name="ErrorOutput" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfNpmExists" Condition=" '$(NpmReturnCode)' != '0' "> |
| 75 | + <Target Name="ErrorOutput" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfpnpmExists" Condition=" '$(pnpmReturnCode)' != '0' "> |
78 | 76 | <Message Importance="high" Text="**********************************************************************************" /> |
79 | 77 | <Message Importance="high" Text="**********************************************************************************" /> |
80 | 78 | <Message Importance="high" Text="**********************************************************************************" /> |
81 | | - <Message Importance="high" Text="***** 'npm --version' return code was $(NpmReturnCode)" /> |
| 79 | + <Message Importance="high" Text="***** 'pnpm --version' return code was $(pnpmReturnCode)" /> |
82 | 80 | <Message Importance="high" Text="CSS and JS not built due to the lack of a proper development environment" /> |
83 | 81 | <Message Importance="high" Text="See https://material-blazor.com/docs/articles/DevelopmentEnvironment.html" /> |
84 | 82 | <Message Importance="high" Text="If the return code is 1, check package.json and package-lock.json" /> |
85 | | - <Message Importance="high" Text="If the return code is 9009, npm is not present" /> |
86 | | - <Message Importance="high" Text="For other non-zero return codes, check npm documentation" /> |
| 83 | + <Message Importance="high" Text="If the return code is 9009, pnpm is not present" /> |
| 84 | + <Message Importance="high" Text="For other non-zero return codes, check pnpm documentation" /> |
87 | 85 | <Message Importance="high" Text="**********************************************************************************" /> |
88 | 86 | <Message Importance="high" Text="**********************************************************************************" /> |
89 | 87 | <Message Importance="high" Text="**********************************************************************************" /> |
90 | 88 | </Target> |
91 | 89 |
|
92 | | - <Target Name="BuildScripts" Inputs="@(InputStaticAssetsScripts)" Outputs="@(OutputStaticAssetsScripts)" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfNpmExists" Condition=" '$(NpmReturnCode)' == '0' "> |
| 90 | + <Target Name="BuildScripts" Inputs="@(InputStaticAssetsScripts)" Outputs="@(OutputStaticAssetsScripts)" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfpnpmExists" Condition=" '$(pnpmReturnCode)' == '0' "> |
93 | 91 | <Message Importance="high" Text="***** MakeDir wwwroot and wwwroot\js (M.B.W Scripts)" /> |
94 | 92 | <Exec Command="mkdir wwwroot\js" IgnoreExitCode="true" /> |
95 | 93 |
|
96 | | - <Message Importance="high" Text="***** npm run build-js (M.B.W Scripts)" /> |
97 | | - <Exec Command="npm run build-js" /> |
| 94 | + <Message Importance="high" Text="***** pnpm run build-js (M.B.W Scripts)" /> |
| 95 | + <Exec Command="pnpm run build-js" /> |
98 | 96 |
|
99 | | - <Message Importance="high" Text="***** npm run build-js-minify (M.B.W Scripts)" /> |
100 | | - <Exec Command="npm run build-js-minify" /> |
| 97 | + <Message Importance="high" Text="***** pnpm run build-js-minify (M.B.W Scripts)" /> |
| 98 | + <Exec Command="pnpm run build-js-minify" /> |
101 | 99 |
|
102 | 100 | </Target> |
103 | 101 |
|
104 | | - <Target Name="BuildStyles" Inputs="@(InputStaticAssetsStyles)" Outputs="@(OutputStaticAssetsStyles)" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfNpmExists" Condition=" '$(NpmReturnCode)' == '0' "> |
| 102 | + <Target Name="BuildStyles" Inputs="@(InputStaticAssetsStyles)" Outputs="@(OutputStaticAssetsStyles)" BeforeTargets="PreBuildEvent" AfterTargets="CheckIfpnpmExists" Condition=" '$(pnpmReturnCode)' == '0' "> |
105 | 103 | <Message Importance="high" Text="***** mkdir wwwroot and wwwroot\css (M.B.W Styles)" /> |
106 | 104 | <Exec Command="mkdir wwwroot\css" IgnoreExitCode="true" /> |
107 | 105 |
|
108 | 106 | <!-- Build minified themes --> |
109 | 107 | <Message Importance="high" Text="***** build material default theme (M.B.W Styles)" /> |
110 | | - <Exec Command="npm run build-min-material-default" /> |
| 108 | + <Exec Command="pnpm run build-min-material-default" /> |
111 | 109 |
|
112 | 110 | <Message Importance="high" Text="***** build light square theme (M.B.W Styles)" /> |
113 | | - <Exec Command="npm run build-min-light-square" /> |
| 111 | + <Exec Command="pnpm run build-min-light-square" /> |
114 | 112 |
|
115 | 113 | <Message Importance="high" Text="***** build dark square theme (M.B.W Styles)" /> |
116 | | - <Exec Command="npm run build-min-dark-square" /> |
| 114 | + <Exec Command="pnpm run build-min-dark-square" /> |
117 | 115 |
|
118 | 116 | <Message Importance="high" Text="***** build rounded theme (M.B.W Styles)" /> |
119 | | - <Exec Command="npm run build-min-rounded" /> |
| 117 | + <Exec Command="pnpm run build-min-rounded" /> |
120 | 118 |
|
121 | 119 | <Message Importance="high" Text="***** build asymmetric theme (M.B.W Styles)" /> |
122 | | - <Exec Command="npm run build-min-asymmetric" /> |
| 120 | + <Exec Command="pnpm run build-min-asymmetric" /> |
123 | 121 |
|
124 | 122 | </Target> |
125 | 123 |
|
|
0 commit comments