slinky 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.travis.yml +1 -1
- data/Gemfile +2 -0
- data/README.md +119 -8
- data/VERSION +1 -1
- data/lib/slinky.rb +2 -0
- data/lib/slinky/builder.rb +4 -2
- data/lib/slinky/compiled_file.rb +1 -1
- data/lib/slinky/compilers.rb +5 -2
- data/lib/slinky/compilers/clojurescript-compiler.rb +4 -4
- data/lib/slinky/compilers/coffee-compiler.rb +4 -3
- data/lib/slinky/compilers/haml-compiler.rb +4 -3
- data/lib/slinky/compilers/jsx-compiler.rb +13 -0
- data/lib/slinky/compilers/less-compiler.rb +4 -3
- data/lib/slinky/compilers/sass-compiler.rb +4 -3
- data/lib/slinky/config_reader.rb +18 -2
- data/lib/slinky/errors.rb +91 -0
- data/lib/slinky/graph.rb +113 -0
- data/lib/slinky/manifest.rb +290 -123
- data/lib/slinky/proxy_server.rb +1 -1
- data/lib/slinky/runner.rb +1 -1
- data/lib/slinky/server.rb +41 -5
- data/lib/slinky/templates/error.css +32 -0
- data/lib/slinky/templates/error.haml +13 -0
- data/lib/slinky/templates/error.js +26 -0
- data/lib/slinky/templates/inject.css +27 -0
- data/slinky.gemspec +17 -3
- data/spec/compilers_spec.rb +15 -0
- data/spec/manifest_spec.rb +750 -0
- data/spec/slinky_spec.rb +9 -421
- data/spec/spec_helper.rb +22 -7
- metadata +83 -47
data/spec/spec_helper.rb
CHANGED
@@ -86,6 +86,19 @@ module Slinky
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
# The JSX compiler doesn't work under FakeFS
|
90
|
+
module JSXCompiler
|
91
|
+
class << self
|
92
|
+
alias :old_compile :compile
|
93
|
+
def JSXCompiler::compile s, file
|
94
|
+
FakeFS.deactivate!
|
95
|
+
o = old_compile(s, file)
|
96
|
+
FakeFS.activate!
|
97
|
+
o
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
89
102
|
# This is necessary because require doesn't work with FakeFS
|
90
103
|
class Compilers
|
91
104
|
class << self
|
@@ -107,13 +120,8 @@ module Slinky
|
|
107
120
|
end
|
108
121
|
|
109
122
|
class Manifest
|
110
|
-
|
111
|
-
|
112
|
-
if block_given?
|
113
|
-
old_compress ext, output, FakeCompressor.new, &Proc.new
|
114
|
-
else
|
115
|
-
old_compress ext, output, FakeCompressor.new
|
116
|
-
end
|
123
|
+
def compressor_for_product product
|
124
|
+
FakeCompressor.new
|
117
125
|
end
|
118
126
|
end
|
119
127
|
|
@@ -141,6 +149,7 @@ RSpec.configure do |config|
|
|
141
149
|
config.before :each do
|
142
150
|
FakeFS.activate!
|
143
151
|
FileUtils.rm_rf("/src") rescue nil
|
152
|
+
FileUtils.rm_rf("/build") rescue nil
|
144
153
|
FileUtils.mkdir("/src")
|
145
154
|
FileUtils.mkdir_p("/src/l1/l2/l3")
|
146
155
|
File.open("/src/test.haml", "w+"){|f|
|
@@ -217,3 +226,9 @@ def run_for secs
|
|
217
226
|
}
|
218
227
|
end
|
219
228
|
end
|
229
|
+
|
230
|
+
# Create an empty file and the enclosing directory, if needed
|
231
|
+
def cf(file)
|
232
|
+
FileUtils.mkdir_p(Pathname.new(file).dirname)
|
233
|
+
File.open(file, "w+").close
|
234
|
+
end
|
metadata
CHANGED
@@ -1,295 +1,323 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slinky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Wylde
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: multi_json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.9.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.9.2
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: eventmachine
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - ~>
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '1.0'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ~>
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: eventmachine_httpserver
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ~>
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0.2'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ~>
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0.2'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: em-websocket
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ~>
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0.3'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ~>
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0.3'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: em-proxy
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - ~>
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0.1'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - ~>
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0.1'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rainbow
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ~>
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '1.1'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ~>
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '1.1'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: mime-types
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ~>
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '1.16'
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ~>
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '1.16'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: yui-compressor
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0.12'
|
104
118
|
type: :runtime
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ~>
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0.12'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: listen
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ~>
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '2.4'
|
118
132
|
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ~>
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '2.4'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: haml
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ~>
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '3.1'
|
132
146
|
type: :runtime
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ~>
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '3.1'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: sass
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ~>
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '3.1'
|
146
160
|
type: :runtime
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ~>
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '3.1'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: coffee-script
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - ~>
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '2.2'
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - ~>
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '2.2'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: rspec
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - ~>
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '2.10'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - ~>
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '2.10'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: yard
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
|
-
- -
|
199
|
+
- - ~>
|
186
200
|
- !ruby/object:Gem::Version
|
187
201
|
version: '0.8'
|
188
202
|
type: :development
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
|
-
- -
|
206
|
+
- - ~>
|
193
207
|
- !ruby/object:Gem::Version
|
194
208
|
version: '0.8'
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: bundler
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
198
212
|
requirements:
|
199
|
-
- -
|
213
|
+
- - ~>
|
200
214
|
- !ruby/object:Gem::Version
|
201
215
|
version: '1.5'
|
202
216
|
type: :development
|
203
217
|
prerelease: false
|
204
218
|
version_requirements: !ruby/object:Gem::Requirement
|
205
219
|
requirements:
|
206
|
-
- -
|
220
|
+
- - ~>
|
207
221
|
- !ruby/object:Gem::Version
|
208
222
|
version: '1.5'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: jeweler
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
212
226
|
requirements:
|
213
|
-
- -
|
227
|
+
- - ~>
|
214
228
|
- !ruby/object:Gem::Version
|
215
229
|
version: '1.8'
|
216
230
|
type: :development
|
217
231
|
prerelease: false
|
218
232
|
version_requirements: !ruby/object:Gem::Requirement
|
219
233
|
requirements:
|
220
|
-
- -
|
234
|
+
- - ~>
|
221
235
|
- !ruby/object:Gem::Version
|
222
236
|
version: '1.8'
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
238
|
name: fakefs
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
226
240
|
requirements:
|
227
|
-
- -
|
241
|
+
- - ~>
|
228
242
|
- !ruby/object:Gem::Version
|
229
243
|
version: '0.5'
|
230
244
|
type: :development
|
231
245
|
prerelease: false
|
232
246
|
version_requirements: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
|
-
- -
|
248
|
+
- - ~>
|
235
249
|
- !ruby/object:Gem::Version
|
236
250
|
version: '0.5'
|
237
251
|
- !ruby/object:Gem::Dependency
|
238
252
|
name: em-http-request
|
239
253
|
requirement: !ruby/object:Gem::Requirement
|
240
254
|
requirements:
|
241
|
-
- -
|
255
|
+
- - ~>
|
242
256
|
- !ruby/object:Gem::Version
|
243
257
|
version: '1.0'
|
244
258
|
type: :development
|
245
259
|
prerelease: false
|
246
260
|
version_requirements: !ruby/object:Gem::Requirement
|
247
261
|
requirements:
|
248
|
-
- -
|
262
|
+
- - ~>
|
249
263
|
- !ruby/object:Gem::Version
|
250
264
|
version: '1.0'
|
251
265
|
- !ruby/object:Gem::Dependency
|
252
266
|
name: simplecov
|
253
267
|
requirement: !ruby/object:Gem::Requirement
|
254
268
|
requirements:
|
255
|
-
- -
|
269
|
+
- - ! '>='
|
256
270
|
- !ruby/object:Gem::Version
|
257
271
|
version: '0'
|
258
272
|
type: :development
|
259
273
|
prerelease: false
|
260
274
|
version_requirements: !ruby/object:Gem::Requirement
|
261
275
|
requirements:
|
262
|
-
- -
|
276
|
+
- - ! '>='
|
263
277
|
- !ruby/object:Gem::Version
|
264
278
|
version: '0'
|
265
279
|
- !ruby/object:Gem::Dependency
|
266
280
|
name: less
|
267
281
|
requirement: !ruby/object:Gem::Requirement
|
268
282
|
requirements:
|
269
|
-
- -
|
283
|
+
- - ! '>='
|
270
284
|
- !ruby/object:Gem::Version
|
271
285
|
version: 2.2.0
|
272
286
|
type: :development
|
273
287
|
prerelease: false
|
274
288
|
version_requirements: !ruby/object:Gem::Requirement
|
275
289
|
requirements:
|
276
|
-
- -
|
290
|
+
- - ! '>='
|
277
291
|
- !ruby/object:Gem::Version
|
278
292
|
version: 2.2.0
|
279
293
|
- !ruby/object:Gem::Dependency
|
280
294
|
name: therubyracer
|
281
295
|
requirement: !ruby/object:Gem::Requirement
|
282
296
|
requirements:
|
283
|
-
- -
|
297
|
+
- - ! '>='
|
284
298
|
- !ruby/object:Gem::Version
|
285
299
|
version: '0'
|
286
300
|
type: :development
|
287
301
|
prerelease: false
|
288
302
|
version_requirements: !ruby/object:Gem::Requirement
|
289
303
|
requirements:
|
290
|
-
- -
|
304
|
+
- - ! '>='
|
291
305
|
- !ruby/object:Gem::Version
|
292
306
|
version: '0'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: react-jsx
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ~>
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: 0.8.0
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - ~>
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: 0.8.0
|
293
321
|
description: A static file server for rich web apps that automatically compiles SASS,
|
294
322
|
HAML, CoffeeScript and more
|
295
323
|
email: micah@micahw.com
|
@@ -300,9 +328,9 @@ extra_rdoc_files:
|
|
300
328
|
- LICENSE.txt
|
301
329
|
- README.md
|
302
330
|
files:
|
303
|
-
-
|
304
|
-
-
|
305
|
-
-
|
331
|
+
- .document
|
332
|
+
- .rspec
|
333
|
+
- .travis.yml
|
306
334
|
- Gemfile
|
307
335
|
- LICENSE.txt
|
308
336
|
- README.md
|
@@ -316,18 +344,26 @@ files:
|
|
316
344
|
- lib/slinky/compilers/clojurescript-compiler.rb
|
317
345
|
- lib/slinky/compilers/coffee-compiler.rb
|
318
346
|
- lib/slinky/compilers/haml-compiler.rb
|
347
|
+
- lib/slinky/compilers/jsx-compiler.rb
|
319
348
|
- lib/slinky/compilers/less-compiler.rb
|
320
349
|
- lib/slinky/compilers/sass-compiler.rb
|
321
350
|
- lib/slinky/config_reader.rb
|
322
351
|
- lib/slinky/em-popen3.rb
|
352
|
+
- lib/slinky/errors.rb
|
353
|
+
- lib/slinky/graph.rb
|
323
354
|
- lib/slinky/listener.rb
|
324
355
|
- lib/slinky/live_reload.rb
|
325
356
|
- lib/slinky/manifest.rb
|
326
357
|
- lib/slinky/proxy_server.rb
|
327
358
|
- lib/slinky/runner.rb
|
328
359
|
- lib/slinky/server.rb
|
360
|
+
- lib/slinky/templates/error.css
|
361
|
+
- lib/slinky/templates/error.haml
|
362
|
+
- lib/slinky/templates/error.js
|
363
|
+
- lib/slinky/templates/inject.css
|
329
364
|
- slinky.gemspec
|
330
365
|
- spec/compilers_spec.rb
|
366
|
+
- spec/manifest_spec.rb
|
331
367
|
- spec/slinky_spec.rb
|
332
368
|
- spec/spec_helper.rb
|
333
369
|
homepage: http://mwylde.github.com/slinky/
|
@@ -340,12 +376,12 @@ require_paths:
|
|
340
376
|
- lib
|
341
377
|
required_ruby_version: !ruby/object:Gem::Requirement
|
342
378
|
requirements:
|
343
|
-
- -
|
379
|
+
- - ! '>='
|
344
380
|
- !ruby/object:Gem::Version
|
345
381
|
version: '0'
|
346
382
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
383
|
requirements:
|
348
|
-
- -
|
384
|
+
- - ! '>='
|
349
385
|
- !ruby/object:Gem::Version
|
350
386
|
version: '0'
|
351
387
|
requirements: []
|