{"id":17650763,"url":"https://github.com/eaceto/easwiftlibrarytemplate","last_synced_at":"2025-03-30T08:22:22.461Z","repository":{"id":37849978,"uuid":"501185426","full_name":"eaceto/EASwiftLibraryTemplate","owner":"eaceto","description":"A template for creating libraries for iOS, macOS, watchOS, tvOS (and possibly Linux!) with Swift","archived":false,"fork":false,"pushed_at":"2022-06-15T20:12:13.000Z","size":2709,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T07:52:05.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eaceto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["eaceto"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://cafecito.app/eaceto"]}},"created_at":"2022-06-08T09:34:39.000Z","updated_at":"2022-07-04T08:54:21.000Z","dependencies_parsed_at":"2022-06-22T23:07:41.106Z","dependency_job_id":null,"html_url":"https://github.com/eaceto/EASwiftLibraryTemplate","commit_stats":null,"previous_names":[],"tags_count":4,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaceto%2FEASwiftLibraryTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaceto%2FEASwiftLibraryTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaceto%2FEASwiftLibraryTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaceto%2FEASwiftLibraryTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eaceto","download_url":"https://codeload.github.com/eaceto/EASwiftLibraryTemplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246291984,"owners_count":20753984,"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":"2024-10-23T11:39:25.361Z","updated_at":"2025-03-30T08:22:22.429Z","avatar_url":"https://github.com/eaceto.png","language":"Shell","funding_links":["https://github.com/sponsors/eaceto","https://cafecito.app/eaceto"],"categories":[],"sub_categories":[],"readme":"# Swift Library Template\n\nA template for creating libraries for iOS, macOS, watchOS, tvOS (and possibly Linux!) with Swift\n\n1. [Getting Started](#getting-started)\n2. [Run (one time) Setup Script](#run-one-time-setup-script)\n3. [Documenting Source Code](#documenting-source-code)\n4. [Pipeline](#pipeline)\n\n## Getting Started\n\nGetting started is as easy as [creating a GitHub project](https://github.com/eaceto/EASwiftLibraryTemplate/generate) using this template, and including **all branches**.\n\n![Create your project using this template and including all branches](/Template/docs/create-using-template.png \"Create your project using this template and including all branches\")\n\n### Setup your GitHub Page\n\nGitHub Page is used to render source code and other automatically generated documentation. Automatically generated documentation includes:\n\n  * Source Code Documentation\n  * (Swift)Linter Report\n  * Code Coverage Report\n\nThis docs are automatically generated when the **CD** workflow runs.\n\nPlease, take into consideration that your GitHub Page should point to **main** branch and **/docs** folders.\n\n![Setting GitHub Pages correctly](/Template/docs/github-page-settings.png \"Setting GitHub Pages correctly\")\n\n## Run *one time* Setup Script\n\nFrom your terminal run:\n\n```sh\n/bin/zsh -c \"$(curl -fsSL https://gist.githubusercontent.com/eaceto/743a8bbdb0696be36c2c03142002626f/raw/setup.sh)\"\n```\n\nThe script will ask for:\n\n  * Library Name\n  * Initial library version\n  * Jazzy or DocC for documentation\n\nAnd then check if the information is ok.\n\n```sh\nEnter the Library name without spaces (i.e.: MySuperProLibrary).\nThis will also be the Target and Product name of the Swift library.\n\nMySuperLib\n\nEnter the initial version of your Library in SemVer format (x.y.z)\n\n1.3.5\n\nDo you want to use 'docs' instead of 'jazzy' as docs generator (BETA) [y/N]?\n\n====== Configuration to apply ======\nPlease verify that the following information is correct\n\nLibrary name: 'MySuperLib'\nLibrary initial version: '1.3.5'\nLibrary homepage url: 'https://github.com/eaceto/EASwiftLibraryTemplate'\nLibrary repository url (SSH): 'git@github.com:eaceto/EASwiftLibraryTemplate.git'\nLibrary repository url (HTTPS): 'https://github.com/eaceto/EASwiftLibraryTemplate.git'\nLibrary GitHub Page: 'https://eaceto.github.io/EASwiftLibraryTemplate/'\n\nDocs using: 'jazzy'\n\n====================================\n\n\nIs this information correct? [y/N]\n```\n\nWhen you confirm that the information is correct, several steps will be taken in order to adapt the template to your project.\n\nThen, you can build and test the library, and if everything is okey commit. \n\n\n## Documenting Source Code\n\nDocumentation is automatically generated using **Jazzy** or **DocC**, and published to GitHub Page. By default GitHub Page **index.md** refers to **Jazzy** documentation, but you can switch it to **DocC** easily. This change can be done in **definitions.json** file, where **docs_generator** accepts **jazzy** or **docc** as valid values.\n\n```json\n{\n    \"name\": \"EASwiftLibraryTemplate\",\n    \"version\": \"0.0.3\",\n    \"homepage\": \"https://github.com/eaceto/EASwiftLibraryTemplate\",\n    \"git\": \"https://github.com/eaceto/EASwiftLibraryTemplate.git\",\n    \"docs_generator\": \"jazzy\"\n}\n```\n\nIn order to know more about Jazzy refer to its [GitHub Repository](https://github.com/realm/jazzy), and if you would like to use DocC please take a look at the [project documentation](https://developer.apple.com/documentation/docc).\n\n## Pipeline\n\nGitHub Actions are used in this template, not only for documentation but also for CI/CD tasks.\n\nThe action defined in **ci.yml** will **build** and **test** the library using Swift v5.5 and v5.6.\n\nIf you need to add/remove a version of Swift, or add **ubuntu** as a target platform, modify the Strategy declared in **ci.yml** \n\n```yml\n    strategy:\n      matrix:\n        os: [macos-latest] ## Add 'ubuntu-latest' if required\n        swift: [\"5.5\", \"5.6\"]\n```\n\nBy default, all pipelines run on branch **main**. Modify the GitHub Actions in order to make it run on other branches. For example, CI can run on main and development branch by changing the following lines in .github/workflows/ci.yml:\n\nFrom this:\n\n```yml\nname: CI\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n  workflow_dispatch:\n```\n\nTo this:\n\n```yml\nname: CI\n\non:\n  push:\n    branches: [main, development]\n  pull_request:\n    branches: [main, development]\n  workflow_dispatch:\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feaceto%2Feaswiftlibrarytemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feaceto%2Feaswiftlibrarytemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feaceto%2Feaswiftlibrarytemplate/lists"}