textmate_fcsh 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/fcsh/fcsh.rb +29 -2
- data/textmate_fcsh.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/lib/fcsh/fcsh.rb
CHANGED
@@ -9,14 +9,27 @@ class Fcsh
|
|
9
9
|
|
10
10
|
|
11
11
|
def compile(command)
|
12
|
-
|
12
|
+
if !@targets.include?(command)
|
13
|
+
errors = compile_first_time!(command)
|
14
|
+
if !errors.nil?
|
15
|
+
puts errors
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
13
20
|
puts "Compiling..."
|
14
21
|
@error_output_last_run = ''
|
15
22
|
@stdin.puts "compile %d" % [@targets.index(command) + 1]
|
16
23
|
|
24
|
+
outfile = "bin/"
|
25
|
+
|
17
26
|
# watch std out till files changed
|
18
27
|
@stdout.each_line do |line|
|
19
|
-
|
28
|
+
if /.+\.swf/.match(line)
|
29
|
+
puts ""
|
30
|
+
break
|
31
|
+
end
|
32
|
+
|
20
33
|
if /Files changed/.match(line)
|
21
34
|
capture_error_output
|
22
35
|
break
|
@@ -30,8 +43,22 @@ class Fcsh
|
|
30
43
|
def compile_first_time!(command)
|
31
44
|
puts "Assigning target..."
|
32
45
|
@stdin.puts command
|
46
|
+
|
47
|
+
@mxmlc_errors = nil
|
48
|
+
a = Thread.new do
|
49
|
+
@stderr.each_line do |line|
|
50
|
+
|
51
|
+
if /Error: /.match(line) || !@mxmlc_errors.nil?
|
52
|
+
@mxmlc_errors ||= "Errors while compiling, please check your .textmate_fcsh. Mxml output:\n"
|
53
|
+
@mxmlc_errors << line
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
|
33
59
|
@targets << command
|
34
60
|
sleep 3
|
61
|
+
return @mxmlc_errors
|
35
62
|
end
|
36
63
|
|
37
64
|
# Currently there is no way of knowing when error output has finished,
|
data/textmate_fcsh.gemspec
CHANGED