closure 1.4.3 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +12 -12
- data/closure-compiler/README.md +503 -0
- data/closure-compiler/compiler.jar +0 -0
- data/closure-templates/SoyToJsSrcCompiler.jar +0 -0
- data/closure-templates/soyutils.js +1593 -469
- data/closure-templates/soyutils_usegoog.js +1105 -223
- data/docs/SCRIPT.md +5 -5
- data/docs/closure/Closure/BeanShell.html +63 -54
- data/docs/closure/Closure/Compiler/Compilation.html +124 -107
- data/docs/closure/Closure/Compiler/Error.html +28 -21
- data/docs/closure/Closure/Compiler.html +81 -76
- data/docs/closure/Closure/FileResponse.html +113 -98
- data/docs/closure/Closure/Goog.html +264 -253
- data/docs/closure/Closure/Middleware.html +66 -55
- data/docs/closure/Closure/Script/NotFound.html +28 -21
- data/docs/closure/Closure/Script/RenderStackOverflow.html +28 -21
- data/docs/closure/Closure/Script.html +212 -203
- data/docs/closure/Closure/Server.html +100 -90
- data/docs/closure/Closure/ShowExceptions.html +63 -52
- data/docs/closure/Closure/Sources.html +254 -246
- data/docs/closure/Closure/Templates/Error.html +28 -21
- data/docs/closure/Closure/Templates.html +88 -80
- data/docs/closure/Closure.html +181 -163
- data/docs/closure/_index.html +42 -38
- data/docs/closure/class_list.html +19 -8
- data/docs/closure/css/full_list.css +4 -2
- data/docs/closure/css/style.css +68 -51
- data/docs/closure/file.LICENSE.html +24 -217
- data/docs/closure/file.README.html +54 -47
- data/docs/closure/file_list.html +20 -9
- data/docs/closure/frames.html +18 -5
- data/docs/closure/index.html +54 -47
- data/docs/closure/js/app.js +60 -46
- data/docs/closure/js/full_list.js +24 -10
- data/docs/closure/js/jquery.js +4 -16
- data/docs/closure/method_list.html +74 -175
- data/docs/closure/top-level-namespace.html +29 -20
- data/lib/closure/compiler.rb +32 -42
- data/lib/closure/goog.rb +12 -12
- data/lib/closure/server.rb +6 -6
- data/lib/closure/show_exceptions.rb +15 -12
- data/lib/closure/version.rb +1 -1
- data/scripts/git.erb +183 -0
- data/scripts/hello/compiler.js.erb +2 -2
- data/scripts/hello/hello.js +1 -1
- data/scripts/hello/index.erb +6 -0
- data/scripts/hello/legume.js +12 -7
- data/scripts/index.erb +15 -13
- data/scripts/modules/compiler.js.erb +3 -3
- data/scripts/modules/compiler_build.js +3 -3
- data/scripts/modules/compiler_build.map +13 -12159
- data/scripts/modules/compiler_build_api.js +1 -1
- data/scripts/modules/compiler_build_app.js +74 -71
- data/scripts/modules/compiler_build_settings.js +2 -2
- data/scripts/modules/index.erb +5 -3
- data/scripts/modules/settings.js +1 -1
- data/scripts/svn.erb +11 -11
- data/scripts/welcome.erb +7 -6
- metadata +65 -81
- data/closure-compiler/README +0 -292
- data/scripts/hello/compiler_build.js +0 -5
- data/scripts/hello/compiler_build.map +0 -748
- data/scripts/hello/compiler_debug.js +0 -119
- data/scripts/modules/compiler_debug.js +0 -6
- data/scripts/modules/compiler_debug_api.js +0 -11
- data/scripts/modules/compiler_debug_app.js +0 -2414
- data/scripts/modules/compiler_debug_settings.js +0 -39
- data/scripts/rails/index.erb +0 -46
- data/scripts/rails/rails_ujs.js +0 -96
@@ -6,19 +6,21 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: Closure::Templates::Error
|
8
8
|
|
9
|
-
— Documentation by YARD 0.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Closure/Templates/Error.html";
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../../_index.html">Index (E)</a> »
|
34
|
+
<a href="../../_index.html">Index (E)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../../Closure.html" title="Closure (class)">Closure</a></span></span> » <span class='title'><span class='object_link'><a href="../Templates.html" title="Closure::Templates (class)">Templates</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Error</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Exception: Closure::Templates::Error
|
60
67
|
|
61
68
|
|
@@ -96,20 +103,20 @@
|
|
96
103
|
|
97
104
|
|
98
105
|
|
99
|
-
|
100
106
|
|
101
107
|
|
102
|
-
|
108
|
+
|
109
|
+
|
103
110
|
|
104
111
|
|
105
112
|
|
106
113
|
|
107
114
|
</div>
|
108
|
-
|
115
|
+
|
109
116
|
<div id="footer">
|
110
|
-
Generated on Sun
|
117
|
+
Generated on Sun Mar 20 12:44:17 2016 by
|
111
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
112
|
-
0.7.
|
119
|
+
0.8.7.6 (ruby-2.2.1).
|
113
120
|
</div>
|
114
121
|
|
115
122
|
</body>
|
@@ -6,19 +6,21 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Closure::Templates
|
8
8
|
|
9
|
-
— Documentation by YARD 0.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Closure/Templates.html";
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../_index.html">Index (T)</a> »
|
34
|
+
<a href="../_index.html">Index (T)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../Closure.html" title="Closure (class)">Closure</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Templates</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Class: Closure::Templates
|
60
67
|
|
61
68
|
|
@@ -94,9 +101,9 @@
|
|
94
101
|
|
95
102
|
<h2>Defined Under Namespace</h2>
|
96
103
|
<p class="children">
|
97
|
-
|
104
|
+
|
98
105
|
|
99
|
-
|
106
|
+
|
100
107
|
|
101
108
|
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Templates/Error.html" title="Closure::Templates::Error (class)">Error</a></span>
|
102
109
|
|
@@ -107,6 +114,8 @@
|
|
107
114
|
|
108
115
|
|
109
116
|
|
117
|
+
|
118
|
+
|
110
119
|
|
111
120
|
<h2>
|
112
121
|
Class Method Summary
|
@@ -129,11 +138,11 @@
|
|
129
138
|
|
130
139
|
|
131
140
|
|
141
|
+
|
132
142
|
|
133
143
|
|
134
|
-
<span class="summary_desc"><div class='inline'
|
135
|
-
Compiles soy to javascript with SoyToJsSrcCompiler.jar
|
136
|
-
</p>
|
144
|
+
<span class="summary_desc"><div class='inline'>
|
145
|
+
<p>Compiles soy to javascript with SoyToJsSrcCompiler.jar.</p>
|
137
146
|
</div></span>
|
138
147
|
|
139
148
|
</li>
|
@@ -146,21 +155,22 @@ Compiles soy to javascript with SoyToJsSrcCompiler.jar.
|
|
146
155
|
|
147
156
|
<div id="class_method_details" class="method_details_list">
|
148
157
|
<h2>Class Method Details</h2>
|
149
|
-
|
158
|
+
|
150
159
|
|
151
160
|
<div class="method_details first">
|
152
|
-
<
|
161
|
+
<h3 class="signature first" id="compile-class_method">
|
153
162
|
|
154
163
|
+ <strong>compile</strong>(args, base = nil)
|
155
164
|
|
156
165
|
|
157
166
|
|
158
|
-
|
167
|
+
|
168
|
+
|
169
|
+
</h3><div class="docstring">
|
159
170
|
<div class="discussion">
|
160
|
-
|
161
|
-
Compiles soy to javascript with SoyToJsSrcCompiler.jar. Supports globbing
|
162
|
-
on source filename arguments
|
163
|
-
</p>
|
171
|
+
|
172
|
+
<p>Compiles soy to javascript with SoyToJsSrcCompiler.jar. Supports globbing
|
173
|
+
on source filename arguments.</p>
|
164
174
|
|
165
175
|
|
166
176
|
</div>
|
@@ -168,20 +178,20 @@ on source filename arguments.
|
|
168
178
|
<div class="tags">
|
169
179
|
|
170
180
|
<div class="examples">
|
171
|
-
<
|
181
|
+
<p class="tag_title">Examples:</p>
|
172
182
|
|
173
|
-
|
174
|
-
<pre class="example code"><span class='const'>Closure</span><span class='op'>::</span><span class='const'>Templates</span><span class='period'>.</span><span class='id
|
183
|
+
|
184
|
+
<pre class="example code"><code><span class='const'>Closure</span><span class='op'>::</span><span class='const'>Templates</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span> <span class='qwords_beg'>%w{
|
175
185
|
</span><span class='tstring_content'> --shouldProvideRequireSoyNamespaces</span><span class='words_sep'>
|
176
186
|
</span><span class='tstring_content'> --cssHandlingScheme</span><span class='words_sep'> </span><span class='tstring_content'>goog</span><span class='words_sep'>
|
177
187
|
</span><span class='tstring_content'> --shouldGenerateJsdoc</span><span class='words_sep'>
|
178
188
|
</span><span class='tstring_content'> --outputPathFormat</span><span class='words_sep'> </span><span class='tstring_content'>{INPUT_DIRECTORY}{INPUT_FILE_NAME_NO_EXT}.js</span><span class='words_sep'>
|
179
189
|
</span><span class='tstring_content'> app/javascripts/**/*.soy</span><span class='words_sep'>
|
180
190
|
</span><span class='tstring_content'> vendor/javascripts/**/*.soy</span><span class='words_sep'>
|
181
|
-
</span><span class='tstring_end'>}</span></span></pre>
|
191
|
+
</span><span class='tstring_end'>}</span></span></code></pre>
|
182
192
|
|
183
193
|
</div>
|
184
|
-
<
|
194
|
+
<p class="tag_title">Parameters:</p>
|
185
195
|
<ul class="param">
|
186
196
|
|
187
197
|
<li>
|
@@ -194,9 +204,8 @@ on source filename arguments.
|
|
194
204
|
|
195
205
|
|
196
206
|
—
|
197
|
-
<div class='inline'
|
198
|
-
Arguments for SoyToJsSrcCompiler.jar
|
199
|
-
</p>
|
207
|
+
<div class='inline'>
|
208
|
+
<p>Arguments for SoyToJsSrcCompiler.jar.</p>
|
200
209
|
</div>
|
201
210
|
|
202
211
|
</li>
|
@@ -213,9 +222,8 @@ Arguments for SoyToJsSrcCompiler.jar.
|
|
213
222
|
|
214
223
|
|
215
224
|
—
|
216
|
-
<div class='inline'
|
217
|
-
All source filenames will be expanded to this location
|
218
|
-
</p>
|
225
|
+
<div class='inline'>
|
226
|
+
<p>All source filenames will be expanded to this location.</p>
|
219
227
|
</div>
|
220
228
|
|
221
229
|
</li>
|
@@ -288,60 +296,60 @@ All source filenames will be expanded to this location.
|
|
288
296
|
<td>
|
289
297
|
<pre class="code"><span class="info file"># File 'lib/closure/templates.rb', line 37</span>
|
290
298
|
|
291
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id
|
292
|
-
<span class='id
|
293
|
-
<span class='id
|
294
|
-
<span class='id
|
295
|
-
</span> <span class='id
|
299
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_compile'>compile</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
300
|
+
<span class='id identifier rubyid_mtimes'>mtimes</span> <span class='op'>=</span> <span class='id identifier rubyid_mtimes'>mtimes</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span>
|
301
|
+
<span class='id identifier rubyid_new_mtimes'>new_mtimes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
302
|
+
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span> <span class='comment'># for bools and numerics
|
303
|
+
</span> <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
296
304
|
<span class='comment'># expand filename globs
|
297
|
-
</span> <span class='id
|
298
|
-
<span class='id
|
299
|
-
<span class='kw'>while</span> <span class='id
|
300
|
-
<span class='kw'>if</span> <span class='id
|
301
|
-
<span class='kw'>if</span> <span class='id
|
302
|
-
<span class='id
|
303
|
-
<span class='id
|
305
|
+
</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:start</span>
|
306
|
+
<span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>=</span> <span class='int'>0</span>
|
307
|
+
<span class='kw'>while</span> <span class='id identifier rubyid_args_index'>args_index</span> <span class='op'><</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
308
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>==</span> <span class='symbol'>:start</span>
|
309
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--outputPathFormat</span><span class='tstring_end'>'</span></span>
|
310
|
+
<span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:expand</span>
|
311
|
+
<span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
304
312
|
<span class='kw'>end</span>
|
305
|
-
<span class='id
|
313
|
+
<span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
306
314
|
<span class='kw'>else</span>
|
307
|
-
<span class='id
|
308
|
-
<span class='id
|
309
|
-
<span class='kw'>if</span> <span class='id
|
310
|
-
<span class='id
|
315
|
+
<span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='rbracket'>]</span>
|
316
|
+
<span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='comma'>,</span> <span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_base'>base</span>
|
317
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\*</span><span class='regexp_end'>/</span></span>
|
318
|
+
<span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='comma'>,</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span> <span class='id identifier rubyid_arg'>arg</span>
|
311
319
|
<span class='kw'>else</span>
|
312
|
-
<span class='id
|
313
|
-
<span class='id
|
320
|
+
<span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_args_index'>args_index</span><span class='comma'>,</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_arg'>arg</span>
|
321
|
+
<span class='id identifier rubyid_args_index'>args_index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
314
322
|
<span class='kw'>end</span>
|
315
323
|
<span class='kw'>end</span>
|
316
324
|
<span class='kw'>end</span>
|
317
325
|
<span class='comment'># extract filenames
|
318
|
-
</span> <span class='id
|
319
|
-
<span class='id
|
320
|
-
<span class='id
|
321
|
-
<span class='id
|
322
|
-
<span class='id
|
326
|
+
</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:start</span>
|
327
|
+
<span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_arg'>arg</span><span class='op'>|</span>
|
328
|
+
<span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:out</span> <span class='kw'>and</span> <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--outputPathFormat</span><span class='tstring_end'>'</span></span>
|
329
|
+
<span class='id identifier rubyid_files'>files</span> <span class='op'><<</span> <span class='id identifier rubyid_arg'>arg</span> <span class='kw'>if</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>==</span> <span class='symbol'>:collect</span>
|
330
|
+
<span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='symbol'>:collect</span> <span class='kw'>if</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>==</span> <span class='symbol'>:out</span>
|
323
331
|
<span class='kw'>end</span>
|
324
332
|
<span class='comment'># detect source changes
|
325
|
-
</span> <span class='id
|
326
|
-
<span class='id
|
327
|
-
<span class='id
|
328
|
-
<span class='id
|
329
|
-
<span class='id
|
330
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='id
|
331
|
-
<span class='id
|
333
|
+
</span> <span class='id identifier rubyid_compiled'>compiled</span> <span class='op'>=</span> <span class='kw'>true</span>
|
334
|
+
<span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
335
|
+
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_file'>file</span>
|
336
|
+
<span class='id identifier rubyid_mtime'>mtime</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_mtime'>mtime</span> <span class='id identifier rubyid_filename'>filename</span> <span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>ENOENT</span>
|
337
|
+
<span class='id identifier rubyid_last_mtime'>last_mtime</span> <span class='op'>=</span> <span class='id identifier rubyid_mtimes'>mtimes</span><span class='lbracket'>[</span><span class='id identifier rubyid_filename'>filename</span><span class='rbracket'>]</span>
|
338
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_mtime'>mtime</span> <span class='kw'>or</span> <span class='op'>!</span><span class='id identifier rubyid_last_mtime'>last_mtime</span> <span class='kw'>or</span> <span class='id identifier rubyid_last_mtime'>last_mtime</span> <span class='op'>!=</span> <span class='id identifier rubyid_mtime'>mtime</span>
|
339
|
+
<span class='id identifier rubyid_compiled'>compiled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
332
340
|
<span class='kw'>end</span>
|
333
|
-
<span class='id
|
341
|
+
<span class='id identifier rubyid_new_mtimes'>new_mtimes</span><span class='lbracket'>[</span><span class='id identifier rubyid_filename'>filename</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_mtime'>mtime</span>
|
334
342
|
<span class='kw'>end</span>
|
335
|
-
<span class='id
|
343
|
+
<span class='id identifier rubyid_mtimes'>mtimes</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
336
344
|
<span class='comment'># compile as needed
|
337
|
-
</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id
|
338
|
-
<span class='id
|
339
|
-
<span class='kw'>unless</span> <span class='id
|
340
|
-
<span class='id
|
345
|
+
</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_compiled'>compiled</span>
|
346
|
+
<span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span> <span class='op'>=</span> <span class='const'>Closure</span><span class='period'>.</span><span class='id identifier rubyid_run_java'>run_java</span> <span class='const'>Closure</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_soy_js_jar'>soy_js_jar</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>com.google.template.soy.SoyToJsSrcCompiler</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span>
|
347
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
348
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>Error</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span>
|
341
349
|
<span class='kw'>end</span>
|
342
350
|
<span class='kw'>end</span>
|
343
351
|
<span class='comment'># success, keep the mtimes for next time
|
344
|
-
</span> <span class='id
|
352
|
+
</span> <span class='id identifier rubyid_mtimes'>mtimes</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span> <span class='id identifier rubyid_new_mtimes'>new_mtimes</span>
|
345
353
|
<span class='kw'>end</span></pre>
|
346
354
|
</td>
|
347
355
|
</tr>
|
@@ -351,11 +359,11 @@ All source filenames will be expanded to this location.
|
|
351
359
|
</div>
|
352
360
|
|
353
361
|
</div>
|
354
|
-
|
362
|
+
|
355
363
|
<div id="footer">
|
356
|
-
Generated on Sun
|
364
|
+
Generated on Sun Mar 20 12:44:17 2016 by
|
357
365
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
358
|
-
0.7.
|
366
|
+
0.8.7.6 (ruby-2.2.1).
|
359
367
|
</div>
|
360
368
|
|
361
369
|
</body>
|