“motion create” will now load templates in /Library/RubyMotionPre if necessary

This commit is contained in:
Laurent Sansonetti
2014-09-17 00:47:28 +09:00
parent 662fc3ed66
commit d017b67fe5

View File

@@ -37,6 +37,8 @@ module Motion; module Project
File.expand_path(File.join(__FILE__, '../template')),
File.expand_path(File.join(ENV['HOME'], 'Library/RubyMotion/template'))
]
pre_templates = '/Library/RubyMotionPre/lib/motion/project/template'
Paths << pre_templates if File.exist?(pre_templates)
# TODO Caching these and making it based on the Paths constant makes it
# less simple to register plugin templates, because you cannot add