Created
July 8, 2012 16:27
-
-
Save franc/3071647 to your computer and use it in GitHub Desktop.
thor script for building Spine.js & Trigger.io Forge app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Spineforge < Thor | |
include Thor::Actions | |
# thor spineforge:fuse ios | |
desc "fuse ios/android","builds and runs app" | |
def fuse(platform) | |
#cd spineapp | |
@spineapp_dir = File.dirname(__FILE__) | |
@forge_dir = @spineapp_dir + '/../' | |
inside @spineapp_dir do | |
run('cd') | |
run('hem build') | |
end | |
#copy spineapp/public/* to src/ | |
Thor::Sandbox::Spineforge.source_root(@spineapp_dir) | |
directory 'public', @forge_dir + 'src' | |
inside @forge_dir do | |
#forge build | |
run 'forge build' | |
#forge run platform | |
run "forge run #{platform}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment