{"id":24302862,"url":"https://github.com/digipolitan/polymorph-gen","last_synced_at":"2026-04-25T05:42:06.422Z","repository":{"id":98675619,"uuid":"99792488","full_name":"Digipolitan/polymorph-gen","owner":"Digipolitan","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-06T22:12:42.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-17T00:20:10.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Digipolitan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T09:49:07.000Z","updated_at":"2019-01-06T22:10:49.000Z","dependencies_parsed_at":"2023-04-14T01:46:54.300Z","dependency_job_id":null,"html_url":"https://github.com/Digipolitan/polymorph-gen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fpolymorph-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fpolymorph-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fpolymorph-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fpolymorph-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Digipolitan","download_url":"https://codeload.github.com/Digipolitan/polymorph-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242225886,"owners_count":20092668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-17T00:19:55.587Z","updated_at":"2026-04-25T05:42:06.390Z","avatar_url":"https://github.com/Digipolitan.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"PolymorphGen\n=================================\n\n[![Swift Version](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](https://developer.apple.com/swift/)\n[![Swift Package Manager](https://rawgit.com/jlyonsmith/artwork/master/SwiftPackageManager/swiftpackagemanager-compatible.svg)](https://swift.org/package-manager/)\n[![Twitter](https://img.shields.io/badge/twitter-@Digipolitan-blue.svg?style=flat)](http://twitter.com/Digipolitan)\n\nBase library to generate files, part of the [Polymorph](https://github.com/Digipolitan/polymorph-cli) project\n\n## Installation\n\n### SPM\n\nTo install PolymorphGen with SwiftPackageManager, add the following lines to your `Package.swift`.\n\n```swift\nlet package = Package(\n    name: \"XXX\",\n    products: [\n        .library(\n            name: \"XXX\",\n            targets: [\"XXX\"]),\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/Digipolitan/polymorph-gen.git\", from: \"1.0.0\")\n    ],\n    targets: [\n        .target(\n            name: \"XXX\",\n            dependencies: [\"PolymorphGen\"])\n    ]\n)\n```\n\n## The Basics\n\nAll child platform must implements the PlatformGen interface and override all fields \u0026 methods\n\n```swift\nclass ExampleGen: PlatformGen {\n    static var name: String {\n        return \"Example\"\n    }\n    static var shared: PlatformGen = ExampleGen()\n\n    private init() { }\n\n    func generate(_ project: Project, options: PolymorphGen.Options) throws -\u003e [File] {\n        // TODO\n    }\n}\n```\n\nAfter that register your platform when initializing the PolymorphGen instance\n\n```swift\nlet generator = PolymorphGen(platforms: [\n    ExampleGen.self\n])\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details!\n\nThis project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to [contact@digipolitan.com](mailto:contact@digipolitan.com).\n\n## License\n\nPolymorphGen is licensed under the [BSD 3-Clause license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fpolymorph-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigipolitan%2Fpolymorph-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fpolymorph-gen/lists"}