Post-commit hook for keeping YAMLes in git instead of XCode project files, NIBs and storyboards
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
templates
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
xcode-yamlizer.gemspec

README.md

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 pretty it looks 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