0.0
No commit activity in last 3 years
No release in over 3 years
Set of git hooks to store YAML files instead of Xcode projects and nibs in repo
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

XcodeYamlizer

XCode's formats are shitty. They are pain to merge and are impossible to read. YAML is pretty.

Imagine a brave new world with XCode's nibs, model files, storyboards, project files - all in YAML. Thats what that project do!

You can see [how] (https://github.com/darvin/iHubot/blob/xcode-yamlizer/iHubot/iHubot.xcdatamodeld/iHubot.xcdatamodel/contents.yaml) [pretty] (https://github.com/darvin/iHubot/blob/xcode-yamlizer/iHubot/iHubot.xcdatamodeld/.xccurrentversion.yaml) [it] (https://github.com/darvin/iHubot/blob/xcode-yamlizer/iHubot/ViewController.xib.yaml) [looks] (https://github.com/darvin/iHubot/blob/xcode-yamlizer/iHubot.xcodeproj/project.pbxproj.yaml) on Github in this sample repo.

Installation

Install XcodeYamlizer with:

$ gem install xcode-yamlizer

Usage

Git hooks

The best and recommended way is to install pre-commit and post-merge hook. You can do that from your project's working directory:

$ xcode-yamlize install

Then, before commit, pre-commit hook will:

  • find all obscure .xibs, .xcdatamodels, project files, etc.
  • create appropriate YAML files with the same name + .yaml extension
  • add them to commit (if necessary)
  • add all obscure files to .gitignore (if necessary)
  • remove all obscure files from git (if necessary) (but will leave them be in file system)

After merge, post-merge hook will:

  • copy all obscure files to the same name + ~ postfix
  • overrite all obscure files from the version controlled yamles.

Standalone

$ xcode-yamlizer
options:
 -input (-i)  convert file (autodetects direction)
 -dir (-d)    convert directory (default direction - from XCode to YAML)
 -to_xcode    direction: from YAML to XCode format
 -verbose     verbose mode
 -help (-h)   show help

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request