Vendor Tailwind and daisyUI in the repo; never reach github.com
Builds used to download the Tailwind binary and the daisyUI plugins from GitHub releases. They are now committed in tools/tailwind/: - the Tailwind 4.3.3 standalone binary for linux-x64, xz -9e compressed (28 MB); - daisyui.mjs and daisyui-theme.mjs 5.7.47; - daisyUI's llms.txt component reference; - Tailwind's MIT license. tools/tailwind.sh no longer touches the network. "prepare" checks every file against its pinned sha256 and unpacks the binary into .tools/. MSBuild reruns it only when the archive or the script changes. A build from scratch was checked inside a network namespace with no network at all. .gitattributes keeps the vendored files byte-exact, and Tailwind no longer scans tools/, whose llms.txt names every daisyUI class. Both workflows used actions/checkout, which a Gitea runner downloads from github.com. They now git fetch the commit from this Gitea, as they already did for SocialPub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
e075c4040b
commit
a097338121
12 files changed
+3667
-72
No files matched your search
+12
-10
@@ -26,28 +26,30 @@
|
||||
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Tailwind CSS standalone + daisyUI (tools/tailwind.sh) compile Styles/app.css into wwwroot/css/app.css on every
|
||||
build. The output is gitignored, so on a clean clone it doesn't exist when the wwwroot\** Content glob is
|
||||
evaluated; IncludeTailwindOutput adds it before ResolveProjectStaticWebAssets, without which it would be
|
||||
published without its .gz/.br copies and outside service-worker-assets.js. -->
|
||||
<!-- Tailwind CSS standalone + daisyUI, vendored in tools/tailwind/ (see tools/tailwind.sh), compile Styles/app.css into
|
||||
wwwroot/css/app.css on every build, offline. The output is gitignored, so on a clean clone it doesn't exist when
|
||||
the wwwroot\** Content glob is evaluated; IncludeTailwindOutput adds it before ResolveProjectStaticWebAssets,
|
||||
without which it would be published without its .gz/.br copies and outside service-worker-assets.js. -->
|
||||
<PropertyGroup>
|
||||
<TailwindToolsDir>$(MSBuildProjectDirectory)/.tools/tailwind/</TailwindToolsDir>
|
||||
<TailwindExe>$(TailwindToolsDir)tailwindcss</TailwindExe>
|
||||
<TailwindVendorDir>$(MSBuildProjectDirectory)/tools/tailwind/</TailwindVendorDir>
|
||||
<TailwindExe>$(MSBuildProjectDirectory)/.tools/tailwind/tailwindcss</TailwindExe>
|
||||
<TailwindMode Condition="'$(Configuration)' == 'Release'">--minify</TailwindMode>
|
||||
<TailwindMode Condition="'$(TailwindMode)' == ''">--optimize</TailwindMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TailwindSource Include="Styles/**/*.css;**/*.razor;**/*.cs;wwwroot/index.html" Exclude="bin/**;obj/**;.tools/**" />
|
||||
<TailwindSource Include="Styles/**/*.css;**/*.razor;**/*.cs;wwwroot/index.html" Exclude="bin/**;obj/**;.tools/**;tools/**" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="EnsureTailwindTools" Condition="!Exists('$(TailwindExe)') Or !Exists('$(TailwindToolsDir)daisyui.mjs') Or !Exists('$(TailwindToolsDir)daisyui-theme.mjs')">
|
||||
<Exec Command="bash tools/tailwind.sh fetch" WorkingDirectory="$(MSBuildProjectDirectory)" />
|
||||
<!-- Unpacks the vendored binary when it is missing or the vendored archive changed (an upgrade). -->
|
||||
<Target Name="EnsureTailwindTools" Inputs="$(TailwindVendorDir)tailwindcss-linux-x64.xz;tools/tailwind.sh" Outputs="$(TailwindExe)">
|
||||
<Exec Command="bash tools/tailwind.sh prepare" WorkingDirectory="$(MSBuildProjectDirectory)" />
|
||||
<Touch Files="$(TailwindExe)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="TailwindCompile" DependsOnTargets="EnsureTailwindTools"
|
||||
Condition="'$(DesignTimeBuild)' != 'true' And '$(NoBuild)' != 'true' And '$(SkipTailwind)' != 'true'"
|
||||
Inputs="@(TailwindSource);$(TailwindExe);$(TailwindToolsDir)daisyui.mjs;$(TailwindToolsDir)daisyui-theme.mjs;$(MSBuildProjectFullPath)"
|
||||
Inputs="@(TailwindSource);$(TailwindExe);$(TailwindVendorDir)daisyui.mjs;$(TailwindVendorDir)daisyui-theme.mjs;$(MSBuildProjectFullPath)"
|
||||
Outputs="wwwroot/css/app.css;$(IntermediateOutputPath)tailwind.stamp">
|
||||
<Exec Command=""$(TailwindExe)" -i Styles/app.css -o wwwroot/css/app.css $(TailwindMode)" WorkingDirectory="$(MSBuildProjectDirectory)" />
|
||||
<!-- The CLI leaves an unchanged output untouched, which would make this target rerun on every build. -->
|
||||
|
||||
Reference in new issue
Block a user