Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Embed generated CSS in Swift raw string literal #288

Merged
merged 8 commits into from
Jun 1, 2021
Merged

Conversation

mattt
Copy link
Contributor

@mattt mattt commented May 26, 2021

Resolves #231
Alternative to #267

As discussed in #267 (comment), this PR takes an alternative approach. Rather than trying to make Swift package resources work, this PR changes our asset pipeline to write directly to a raw string literal constant in a Swift source file, which can be referred to directly in code.

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a minor nit to pick 😅

.node/package.json Outdated Show resolved Hide resolved
@mattt mattt merged commit e3940d5 into master Jun 1, 2021
@mattt mattt deleted the embed-css-in-swift branch June 1, 2021 12:08
mattt added a commit that referenced this pull request Jun 1, 2021
* Replace postcss CLI usage with custom script

Write generated CSS to Swift file using raw string literal

* Update README

* Update .gitattributes

* Update .gitignore

* Update validate-assets job in CI workflow

* Update generated CSS

* Formatting

* Consolidate watch scripts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS assets don't reflect swift-doc's versioning
3 participants