|
1 | | -# ystepper-ios |
| 1 | +_Accessible and customizable Stepper user interface elements for iOS._ |
| 2 | + |
| 3 | +Licensing |
| 4 | +---------- |
| 5 | +Y—Stepper is licensed under the [Apache 2.0 license](LICENSE). |
| 6 | + |
| 7 | +Documentation |
| 8 | +---------- |
| 9 | + |
| 10 | +Documentation is automatically generated from source code comments and rendered as a static website hosted via GitHub Pages at: https://yml-org.github.io/ystepper-ios/ |
| 11 | + |
| 12 | +Usage |
| 13 | +---------- |
| 14 | + |
| 15 | +Installation |
| 16 | +---------- |
| 17 | + |
| 18 | +You can add Y—Stepper to an Xcode project by adding it as a package dependency. |
| 19 | + |
| 20 | +1. From the **File** menu, select **Add Packages...** |
| 21 | +2. Enter "[https://github.com/yml-org/ystepper-ios](https://github.com/yml-org/ystepper-ios)" into the package repository URL text field |
| 22 | +3. Click **Add Package** |
| 23 | + |
| 24 | +Contributing to Y—Stepper |
| 25 | +---------- |
| 26 | + |
| 27 | +### Requirements |
| 28 | + |
| 29 | +#### SwiftLint (linter) |
| 30 | +``` |
| 31 | +brew install swiftlint |
| 32 | +``` |
| 33 | + |
| 34 | +#### Jazzy (documentation) |
| 35 | +``` |
| 36 | +sudo gem install jazzy |
| 37 | +``` |
| 38 | + |
| 39 | +### Setup |
| 40 | + |
| 41 | +Clone the repo and open `Package.swift` in Xcode. |
| 42 | + |
| 43 | +### Versioning strategy |
| 44 | + |
| 45 | +We utilize [semantic versioning](https://semver.org). |
| 46 | + |
| 47 | +``` |
| 48 | +{major}.{minor}.{patch} |
| 49 | +``` |
| 50 | + |
| 51 | +e.g. |
| 52 | + |
| 53 | +``` |
| 54 | +1.0.5 |
| 55 | +``` |
| 56 | + |
| 57 | +### Branching strategy |
| 58 | + |
| 59 | +We utilize a simplified branching strategy for our frameworks. |
| 60 | + |
| 61 | +* main (and development) branch is `main` |
| 62 | +* both feature (and bugfix) branches branch off of `main` |
| 63 | +* feature (and bugfix) branches are merged back into `main` as they are completed and approved. |
| 64 | +* `main` gets tagged with an updated version # for each release |
| 65 | + |
| 66 | +### Branch naming conventions: |
| 67 | + |
| 68 | +``` |
| 69 | +feature/{ticket-number}-{short-description} |
| 70 | +bugfix/{ticket-number}-{short-description} |
| 71 | +``` |
| 72 | +e.g. |
| 73 | +``` |
| 74 | +feature/CM-44-button |
| 75 | +bugfix/CM-236-textview-color |
| 76 | +``` |
| 77 | + |
| 78 | +### Pull Requests |
| 79 | + |
| 80 | +Prior to submitting a pull request you should: |
| 81 | + |
| 82 | +1. Compile and ensure there are no warnings and no errors. |
| 83 | +2. Run all unit tests and confirm that everything passes. |
| 84 | +3. Check unit test coverage and confirm that all new / modified code is fully covered. |
| 85 | +4. Run `swiftlint` from the command line and confirm that there are no violations. |
| 86 | +5. Run `jazzy` from the command line and confirm that you have 100% documentation coverage. |
| 87 | +6. Consider using `git rebase -i HEAD~{commit-count}` to squash your last {commit-count} commits together into functional chunks. |
| 88 | +7. If HEAD of the parent branch (typically `main`) has been updated since you created your branch, use `git rebase main` to rebase your branch. |
| 89 | + * _Never_ merge the parent branch into your branch. |
| 90 | + * _Always_ rebase your branch off of the parent branch. |
| 91 | + |
| 92 | +When submitting a pull request: |
| 93 | + |
| 94 | +* Use the [provided pull request template](PULL_REQUEST_TEMPLATE.md) and populate the Introduction, Purpose, and Scope fields at a minimum. |
| 95 | +* If you're submitting before and after screenshots, movies, or GIF's, enter them in a two-column table so that they can be viewed side-by-side. |
| 96 | + |
| 97 | +When merging a pull request: |
| 98 | + |
| 99 | +* Make sure the branch is rebased (not merged) off of the latest HEAD from the parent branch. This keeps our git history easy to read and understand. |
| 100 | +* Make sure the branch is deleted upon merge (should be automatic). |
| 101 | + |
| 102 | +### Releasing new versions |
| 103 | +* Tag the corresponding commit with the new version (e.g. `1.0.5`) |
| 104 | +* Push the local tag to remote |
| 105 | + |
| 106 | +Generating Documentation (via Jazzy) |
| 107 | +---------- |
| 108 | + |
| 109 | +You can generate your own local set of documentation directly from the source code using the following command from Terminal: |
| 110 | +``` |
| 111 | +jazzy |
| 112 | +``` |
| 113 | +This generates a set of documentation under `/docs`. The default configuration is set in the default config file `.jazzy.yaml` file. |
| 114 | + |
| 115 | +To view additional documentation options type: |
| 116 | +``` |
| 117 | +jazzy --help |
| 118 | +``` |
| 119 | +A GitHub Action automatically runs each time a commit is pushed to `main` that runs Jazzy to generate the documentation for our GitHub page at: https://yml-org.github.io/ystepper-ios/ |
0 commit comments