GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Digipolitan/polymorph-core

BranchesTags
Open more actions menu

Latest commit

 

History

52 Commits
52 Commits

Folders and files

NameName
Last commit message
Last commit date
Sources/PolymorphCore
Sources/PolymorphCore
 
 
Tests
Tests
 
 
.gitignore
.gitignore
 
 
.swiftlint.yml
.swiftlint.yml
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Package.resolved
Package.resolved
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 

Repository files navigation

PolymorphCore

Swift Version Swift Package Manager Twitter

Core models to the PolymorphCore project

Installation

SPM

To install PolymorphCore with SwiftPackageManager, add the following lines to your Package.swift.

let package = Package(
    name: "XXX",
    products: [
        .library(
            name: "XXX",
            targets: ["XXX"]),
    ],
    dependencies: [
        .package(url: "https://github.com/Digipolitan/polymorph-core.git", from: "1.1.0")
    ],
    targets: [
        .target(
            name: "XXX",
            dependencies: ["PolymorphCore"])
    ]
)

The Basics

guard let package = try? Package(string: "com.digipolitan.sample"),
      let userPackage = try? Package(string: "user") else {
    return
}
let project = Project(name: "Sample", package: package)
project.models.addClass(.init(name: "User", package: userPackage))

let encoder = JSONEncoder()
if let data = try? encoder.encode(project),
    let json = String(data: data, encoding: .utf8) {
    print(json) // Print project as JSON
}

Contributing

See CONTRIBUTING.md for more details!

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

License

PolymorphCore is licensed under the BSD 3-Clause license.

About

No description or website provided.

Topics

modelspolymorphswift

Resources

Readme
BSD-3-Clause license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

1 star

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.