Swiftpack.co - Package - MakeupStudio/Makeup

Makeup 💋

(See develop/release brunch for the more relevant codebase.)

(Deadlines are missed, but still working on improvements & CSS DSL)

Bitrise SwiftPM Mac & Linux Twitter: @maximkrouk

Swift DSL for rendering HTML. Not the first, but the best (will become, one day... 😌)

Usage

// Swift
document {
    html {
        head {
            title("My first Site")
        }
        body {
            header {
                h1("Hello, world!")
            }
            main {
                h2("Rendered by Makeup.")
                a("GitHub")
                    .href("https://github.com/maximkrouk/Makeup")
                    .foreground(color: .livingCoral)
            }
            footer {
                h6("Makeup. Swift HTML-rendering framework.")
            }
        }
        .font(name: .arial)
        .foreground(color: .white)
        .background(color: .ultraviolet)
    }
}

is rendered to:

<!DOCTYPE HTML>
<html>
    <head>
        <title>
            My first Site
        </title>
    </head>
    <body style="font-family:'arial';color:rgba(255.0,255.0,255.0,255.0);background-color:rgba(100.0,83.0,148.0,255.0);">
        <header>
            <h1>
                Hello, world!
            </h1>
        </header>
        <main>
            <h2>
                Rendered by Makeup.
            </h2>
            <a href="https://github.com/maximkrouk/Makeup", style="color:rgba(250.0,114.0,104.0,255.0);">
                GitHub
            </a>
        </main>
        <footer>
            <h6>
                Makeup. Swift HTML-rendering framework.
            </h6>
        </footer>
    </body>
</html>

and looks like:

Example-iPhone5

Installation

Add the package to Your SwiftPM package dependencies:

.package(url: "https://github.com/MakeupStudio/Makeup.git", from: "0.2.1")

then add Makeup dependency to your target.

Still in Beta

Not recommended for production use before the first release, but you are welcome to test it out 😉

Calendar:

  • ✅ Basics (Nodes, Attributes, some CSS)

  • ✅ Assets (WebColor, WebSize, Webfonts)

  • ✅ Preparations for semantic filtering

  • ✅ Function Builders

  • ✅ Html building functions

  • ✅ String literal support

  • ✅ Rendering

  • ⏱ NodeWrapper attibutes modification via suffixed methods (dot-notation like in the Usage example)

    • December 2019 - Janruary 2020
  • 🗳 Xcode documentation in sources

    • December 2019 - Janruary 2020
  • ⏱ Git-flow

    • December 2019 - Janruary 2020
  • ⏱ First release (API v1, static pages & simple sites production ready) (1.0.0)

    • Janruary 2020
  • 🗳 Contribution guide with explanations of the package architecture

    • December 2019 – Janruary 2020
  • 🗳 Attributes extended support (via static factories)

    • January 2020
  • 🗳 API v2 (2.0.0)

    • February 2020
  • 🗳 External docs & Examples

    • Up to May 2020
  • 🗳 Testing

    • Up to May 2020
  • 🗳 API v3 (3.0.0)

    • May - June 2020
  • Other

    • 🗳 SVG support
    • 🗳 Drawing engine, based on SVG
    • 🗳 XML support
    • 🗳 MD support
    • 🗳 Syntax highlighting
    • 🗳 Swift grammar for syntax highlighting
    • 🗳 JS support
    • 🗳 CSS extended support
    • ⏱ Extracting colors into another library (GenericColors)

✅ - Done

⏱ - In progress

🗳 - Waiting

Sites using Makeup

mxswift

Thanks for inspiration and ideas


You may contact me here if You want to contribute before the guide is provided or if You have any other questions or ideas.


Github

link
Stars: 11

Dependencies

Used By

Total: 0