Permalink
Browse files

(Sample) Ruble for Titanium Studio

Adds menu items and keyboard shortcuts to integrate with
tishadow. The server must be running first. Look at the
source for details.
  • Loading branch information...
1 parent ae734cc commit c134ad97c0247b119195062fa64f29b464abd861 @dbankier committed Mar 27, 2012
Showing with 61 additions and 0 deletions.
  1. +22 −0 ruble/bundle.rb
  2. +26 −0 ruble/commands/commands.rb
  3. +13 −0 ruble/snippets/snippets.rb
View
@@ -0,0 +1,22 @@
+require 'ruble'
+
+bundle do |bundle|
+ bundle.display_name = 'TiShadow'
+ bundle.author = 'David Bankier (@davidbankier)'
+ bundle.copyright = <<END
+(c) Copyright 2011 YY Digital Pty Ltd.
+See https://github.com/dbankier/TiShadow/blob/master/LICENSE
+END
+
+ bundle.description = <<END
+Sample description
+END
+ bundle.menu 'TiShadowLaunch' do |menu|
+ menu.menu 'Run' do |sub_menu|
+ sub_menu.command 'Full TiShadow Build'
+ sub_menu.command 'TiShadow Build Update'
+ end
+ menu.separator
+ menu.command 'Open TiShadow Webpage'
+ end
+end
View
@@ -0,0 +1,26 @@
+require 'ruble'
+
+command 'Full TiShadow Build' do |cmd|
+ cmd.key_binding = 'CTRL+S'
+ cmd.output = :output_to_console
+ cmd.working_directory = :current_project
+ cmd.invoke = "tishadow"
+end
+
+command 'TiShadow Build Update' do |cmd|
+ cmd.key_binding = 'SHIFT+CTRL+S'
+ cmd.input = :none
+ cmd.output = :output_to_console
+ #Auto update on save currently working...
+ #cmd.trigger = :execution_listener, "org.eclipse.ui.file.save"
+ cmd.working_directory = :current_project
+ cmd.invoke = "tishadow update"
+end
+
+command 'Open TiShadow Webpage' do |cmd|
+ cmd.key_binding = 'ALT+CTRL+S'
+ cmd.output = :output_to_console
+ cmd.invoke do |context|
+ context.browser.open("http://localhost:3000", :browser => :default)
+ end
+end
View
@@ -0,0 +1,13 @@
+require 'ruble'
+
+snippet "exports for app" do |snip|
+ snip.trigger = "tiexport"
+ snip.expansion = """if (exports) {
+ exports.close = function() {
+ ${1:close_content}
+ };
+}"""
+end
+
+# Use Commands > Bundle Development > Insert Bundle Section > Snippet
+# to easily add new snippets

0 comments on commit c134ad9

Please sign in to comment.