Swiftpack.co -  jumpper/jumpper as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
jumpper/jumpper
A simple framework for creating HTML with Swift
.package(url: "https://github.com/jumpper/jumpper.git", from: "v0.0.1")

jumpper

Swift 5.2 Swift Package Manager Mac + Linux jumpper tests License codebeat badge

Buy Me A Coffee

-----

Welcome to jumpper. Is an open source framework, which is independent of other web frameworks or toolkits available on the market, such as Vapor, Kitura and Perfect. It can be used in conjunction with any of them and even alone. This shows how simple it is to build HTML pages using only Swift.

The idea of this library is to facilitate the creation of static or dynamic pages.

About 10 years ago I developed a library similar to this one, but in another language, it streamlined many projects that I developed.

I decided to bring these concepts to the language I use today.

The project is still under development, feel free to collaborate and leave suggestions, fork and share.

I hope it will be useful for more developers.

Let`s code.

Documentation

Vapor usage

Need Leaf installed

import jumpper

router.get { req -> Future<View> in
     let div = Div()
     div.add("My first div with jumpper")
     return try req.view().render("base", ["title": "Hello jumpper", "body": div.getString()])
}

jumpper vapor project demo

Elements Video Demo

Watch the video

GitHub

link
Stars: 20
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

0.0.8
5 weeks ago
  • Doctype
let doctype = Doctype()
doctype.getString() // or doctype.generate()
  • Body
let body = Body()
body.add(/* Any Element*/)
  • Head
let head = Head()
head.add(/* Any Element*/)
  • Html
let html = Html()
html.add(/* Any Element*/)
  • LinkStylesheet
let linkCssTag = LinkStylesheet("/styles/milligram.min.css")
  • Link
let linkTag = Link("/styles/milligram.min.css", attributes: ("rel", "stylesheet"))
  • Meta
let meta = Meta(("charset", "utf-8")))
  • Script
let script = Script()
script.add("var myJsVar = 1")

let script = Script(("src","myScript.js"))
  • Title
let pageTitle = Title("This is Page.")
  • Footer
let footer = Footer()
footer.add(/* Any Element*/)
  • Header
let header = Header()
header.add(/* Any Element*/)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API