Running the project
Check our SwiftLint installation guide to setup SwiftLint.
You should install Marathon using the Swift Package Manager (NOTE: If you installed it with Swift 4.0-4.0.3, you will need to reinstall it with 4.1), since installation with Homebrew isn't working correctly. Please use following steps, based on Marathon's SPM instructions, at the command line:
cdinto any directory where you would like to check out the Marathon source code. It does not need to be a sub-directory of Toshi (and probably shouldn't be so the Marathon source doesn't get checked in to git).
git clone https://github.com/JohnSundell/Marathon.git- This will check out the source code into the current working directory.
- If the
swift-4.1branch of Marathon still hasn't been merged, please also run:
git fetch origin swift-4.1then
git checkout swift-4.1before proceeding to step 4 to use the appropriate branch which will build with Swift 4.1. If the linked PR has been merged, you may skip this step.
cd Marathon- This will put you inside Marathon's main source code folder.
swift build -c release -Xswiftc -static-stdlib- This will build Marathon for release as a static library.
cp -f .build/release/Marathon /usr/local/bin/marathon- This will copy the static library into
/usr/local/bin/so that it can be called from anywhere in the filesystem.
Once this final step is complete, feel free to delete the folder where you checked Marathon out and built it, since you will be relying on the copied compiled binary instead of anything in that folder.
Additionally, there's some weirdness going on with Stencil's test dependencies, so using a
Marathonfile results in weird installation issues. In order to actually get Marathon to work for this project, please follow the following steps, IN THIS ORDER:
- Remove your macOS user's
~/.marathonfolder - this will remove all caches. [NOTE: This folder may not exist if you've never run Marathon before]
marathon add https://github.com/johnsundell/Files.git
marathon add https://github.com/johnsundell/shellout.git
marathon add https://github.com/kylef/Stencil.git
- DO NOT use
marathon updateuntil the issue with Stencil's dependencies is resolved.
Once you've got Marathon set up, here's what you need to change to cause generated code to update when you build the Debug target:
|Changes to File or Folder||Cause Marathon To Regenerate File|
If you are making changes in any of these places and do NOT have Marathon installed, you will not be able to use the new assets or strings you're using with our fancy generated helpers. Please install Marathon using the steps above if you want to make changes.
Copyright © 2017-2018 Toshi Holdings Pte. Ltd. <https://www.toshi.org/>
"Toshi" is a registered trade mark. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor.
This program is free software: you can redistribute it and/or modify it under the terms of the version 3 of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.