batman-rails-flo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +29 -0
  3. data/Rakefile +2 -0
  4. data/lib/batman-rails-flo.rb +5 -0
  5. data/lib/batman_rails_flo/railtie.rb +9 -0
  6. data/lib/batman_rails_flo/tasks.rake +14 -0
  7. data/lib/batman_rails_flo/version.rb +3 -0
  8. data/vendor/assets/javascripts/batman_rails_flo/flo_server.js +67 -0
  9. data/vendor/assets/javascripts/batman_rails_flo/live_reload.js.coffee +129 -0
  10. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CNAME +1 -0
  11. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CONTRIBUTING.md +9 -0
  12. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/LICENSE +22 -0
  13. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/README +50 -0
  14. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/cake +7 -0
  15. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/coffee +7 -0
  16. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/browser.js +134 -0
  17. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/cake.js +112 -0
  18. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/coffee-script.js +335 -0
  19. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/command.js +569 -0
  20. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/grammar.js +631 -0
  21. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/helpers.js +252 -0
  22. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
  23. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/lexer.js +926 -0
  24. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/nodes.js +3158 -0
  25. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/optparse.js +139 -0
  26. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/parser.js +724 -0
  27. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/register.js +66 -0
  28. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/repl.js +163 -0
  29. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/rewriter.js +475 -0
  30. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
  31. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/sourcemap.js +161 -0
  32. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/LICENSE +21 -0
  33. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/examples/pow.js +6 -0
  34. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/index.js +82 -0
  35. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/package.json +34 -0
  36. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/readme.markdown +63 -0
  37. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/chmod.js +38 -0
  38. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/clobber.js +37 -0
  39. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/mkdirp.js +28 -0
  40. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm.js +32 -0
  41. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm_sync.js +39 -0
  42. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/race.js +41 -0
  43. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/rel.js +32 -0
  44. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return.js +25 -0
  45. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return_sync.js +24 -0
  46. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/root.js +18 -0
  47. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/sync.js +32 -0
  48. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask.js +28 -0
  49. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask_sync.js +32 -0
  50. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/package.json +50 -0
  51. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/register.js +1 -0
  52. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/LICENSE +30 -0
  53. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/PATENTS +23 -0
  54. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/README.md +124 -0
  55. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/bin/flo +26 -0
  56. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.html +57 -0
  57. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.js +205 -0
  58. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/style.css +334 -0
  59. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/connection.js +235 -0
  60. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/devtools.html +12 -0
  61. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/index.js +323 -0
  62. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logger.js +42 -0
  63. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logo.png +0 -0
  64. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/manifest.json +13 -0
  65. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/session.js +305 -0
  66. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/index.js +10 -0
  67. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/flo.js +226 -0
  68. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/server.js +94 -0
  69. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/README.md +66 -0
  70. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/index.js +437 -0
  71. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/LICENSE +23 -0
  72. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/README.md +218 -0
  73. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/minimatch.js +1055 -0
  74. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
  75. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
  76. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
  77. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
  78. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
  79. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
  80. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
  81. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
  82. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
  83. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
  84. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
  85. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
  86. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
  87. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
  88. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/package.json +40 -0
  89. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/basic.js +399 -0
  90. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/brace-expand.js +33 -0
  91. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/caching.js +14 -0
  92. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/defaults.js +274 -0
  93. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  94. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/lib/walker.js +111 -0
  95. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/license +13 -0
  96. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/lib/makeerror.js +87 -0
  97. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/lib/tmpl.js +17 -0
  98. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/package.json +31 -0
  99. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/readme.md +10 -0
  100. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/package.json +34 -0
  101. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/readme.md +77 -0
  102. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/package.json +36 -0
  103. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/readme.md +52 -0
  104. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/LICENSE +55 -0
  105. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/main.js +128 -0
  106. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/package.json +34 -0
  107. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/readme.mkd +72 -0
  108. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/d/t +0 -0
  109. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/t +0 -0
  110. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitor.js +31 -0
  111. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitorRootDirectory.js +28 -0
  112. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_watchTree.js +20 -0
  113. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/package.json +45 -0
  114. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/test/test.js +243 -0
  115. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/CHANGELOG.md +81 -0
  116. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/LICENSE +177 -0
  117. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/Makefile +11 -0
  118. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/README.md +245 -0
  119. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/binding.gyp +14 -0
  120. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Makefile +355 -0
  121. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/linker.lock +0 -0
  122. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/validation/src/validation.o +0 -0
  123. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/xor/src/xor.o +0 -0
  124. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/validation.node +0 -0
  125. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/xor.node +0 -0
  126. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/binding.Makefile +6 -0
  127. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/config.gypi +115 -0
  128. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/gyp-mac-tool +512 -0
  129. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/validation.target.mk +154 -0
  130. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/xor.target.mk +154 -0
  131. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/index.js +1 -0
  132. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/install.js +31 -0
  133. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Constants.js +23 -0
  134. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Deprecation.js +38 -0
  135. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.fallback.js +12 -0
  136. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.js +18 -0
  137. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketClient.js +359 -0
  138. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketConnection.js +717 -0
  139. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketFrame.js +282 -0
  140. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRequest.js +478 -0
  141. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouter.js +154 -0
  142. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouterRequest.js +59 -0
  143. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketServer.js +216 -0
  144. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/utils.js +7 -0
  145. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/websocket.js +11 -0
  146. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.fallback.js +13 -0
  147. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.js +18 -0
  148. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/package.json +43 -0
  149. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/validation.cc +144 -0
  150. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/xor.cpp +86 -0
  151. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/FastBufferList.js +192 -0
  152. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/LICENSE +18 -0
  153. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/ctio-faster.js +1126 -0
  154. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/package.json +25 -0
  155. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/browser_websocket.js +63 -0
  156. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/connection_test.js +57 -0
  157. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/logger_mock.js +15 -0
  158. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/session_test.js +194 -0
  159. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/server/flo_test.js +211 -0
  160. data/vendor/assets/javascripts/batman_rails_flo/package.json +15 -0
  161. data/vendor/assets/javascripts/batman_rails_flo/reload_event_handler.js.coffee +56 -0
  162. metadata +232 -0
@@ -0,0 +1,146 @@
1
+ // Generated by CoffeeScript 1.7.1
2
+ (function() {
3
+ var Scope, extend, last, _ref;
4
+
5
+ _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
6
+
7
+ exports.Scope = Scope = (function() {
8
+ Scope.root = null;
9
+
10
+ function Scope(parent, expressions, method) {
11
+ this.parent = parent;
12
+ this.expressions = expressions;
13
+ this.method = method;
14
+ this.variables = [
15
+ {
16
+ name: 'arguments',
17
+ type: 'arguments'
18
+ }
19
+ ];
20
+ this.positions = {};
21
+ if (!this.parent) {
22
+ Scope.root = this;
23
+ }
24
+ }
25
+
26
+ Scope.prototype.add = function(name, type, immediate) {
27
+ if (this.shared && !immediate) {
28
+ return this.parent.add(name, type, immediate);
29
+ }
30
+ if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
31
+ return this.variables[this.positions[name]].type = type;
32
+ } else {
33
+ return this.positions[name] = this.variables.push({
34
+ name: name,
35
+ type: type
36
+ }) - 1;
37
+ }
38
+ };
39
+
40
+ Scope.prototype.namedMethod = function() {
41
+ var _ref1;
42
+ if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
43
+ return this.method;
44
+ }
45
+ return this.parent.namedMethod();
46
+ };
47
+
48
+ Scope.prototype.find = function(name) {
49
+ if (this.check(name)) {
50
+ return true;
51
+ }
52
+ this.add(name, 'var');
53
+ return false;
54
+ };
55
+
56
+ Scope.prototype.parameter = function(name) {
57
+ if (this.shared && this.parent.check(name, true)) {
58
+ return;
59
+ }
60
+ return this.add(name, 'param');
61
+ };
62
+
63
+ Scope.prototype.check = function(name) {
64
+ var _ref1;
65
+ return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
66
+ };
67
+
68
+ Scope.prototype.temporary = function(name, index) {
69
+ if (name.length > 1) {
70
+ return '_' + name + (index > 1 ? index - 1 : '');
71
+ } else {
72
+ return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
73
+ }
74
+ };
75
+
76
+ Scope.prototype.type = function(name) {
77
+ var v, _i, _len, _ref1;
78
+ _ref1 = this.variables;
79
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
80
+ v = _ref1[_i];
81
+ if (v.name === name) {
82
+ return v.type;
83
+ }
84
+ }
85
+ return null;
86
+ };
87
+
88
+ Scope.prototype.freeVariable = function(name, reserve) {
89
+ var index, temp;
90
+ if (reserve == null) {
91
+ reserve = true;
92
+ }
93
+ index = 0;
94
+ while (this.check((temp = this.temporary(name, index)))) {
95
+ index++;
96
+ }
97
+ if (reserve) {
98
+ this.add(temp, 'var', true);
99
+ }
100
+ return temp;
101
+ };
102
+
103
+ Scope.prototype.assign = function(name, value) {
104
+ this.add(name, {
105
+ value: value,
106
+ assigned: true
107
+ }, true);
108
+ return this.hasAssignments = true;
109
+ };
110
+
111
+ Scope.prototype.hasDeclarations = function() {
112
+ return !!this.declaredVariables().length;
113
+ };
114
+
115
+ Scope.prototype.declaredVariables = function() {
116
+ var realVars, tempVars, v, _i, _len, _ref1;
117
+ realVars = [];
118
+ tempVars = [];
119
+ _ref1 = this.variables;
120
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
121
+ v = _ref1[_i];
122
+ if (v.type === 'var') {
123
+ (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
124
+ }
125
+ }
126
+ return realVars.sort().concat(tempVars.sort());
127
+ };
128
+
129
+ Scope.prototype.assignedVariables = function() {
130
+ var v, _i, _len, _ref1, _results;
131
+ _ref1 = this.variables;
132
+ _results = [];
133
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
134
+ v = _ref1[_i];
135
+ if (v.type.assigned) {
136
+ _results.push("" + v.name + " = " + v.type.value);
137
+ }
138
+ }
139
+ return _results;
140
+ };
141
+
142
+ return Scope;
143
+
144
+ })();
145
+
146
+ }).call(this);
@@ -0,0 +1,161 @@
1
+ // Generated by CoffeeScript 1.7.1
2
+ (function() {
3
+ var LineMap, SourceMap;
4
+
5
+ LineMap = (function() {
6
+ function LineMap(line) {
7
+ this.line = line;
8
+ this.columns = [];
9
+ }
10
+
11
+ LineMap.prototype.add = function(column, _arg, options) {
12
+ var sourceColumn, sourceLine;
13
+ sourceLine = _arg[0], sourceColumn = _arg[1];
14
+ if (options == null) {
15
+ options = {};
16
+ }
17
+ if (this.columns[column] && options.noReplace) {
18
+ return;
19
+ }
20
+ return this.columns[column] = {
21
+ line: this.line,
22
+ column: column,
23
+ sourceLine: sourceLine,
24
+ sourceColumn: sourceColumn
25
+ };
26
+ };
27
+
28
+ LineMap.prototype.sourceLocation = function(column) {
29
+ var mapping;
30
+ while (!((mapping = this.columns[column]) || (column <= 0))) {
31
+ column--;
32
+ }
33
+ return mapping && [mapping.sourceLine, mapping.sourceColumn];
34
+ };
35
+
36
+ return LineMap;
37
+
38
+ })();
39
+
40
+ SourceMap = (function() {
41
+ var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK;
42
+
43
+ function SourceMap() {
44
+ this.lines = [];
45
+ }
46
+
47
+ SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) {
48
+ var column, line, lineMap, _base;
49
+ if (options == null) {
50
+ options = {};
51
+ }
52
+ line = generatedLocation[0], column = generatedLocation[1];
53
+ lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line)));
54
+ return lineMap.add(column, sourceLocation, options);
55
+ };
56
+
57
+ SourceMap.prototype.sourceLocation = function(_arg) {
58
+ var column, line, lineMap;
59
+ line = _arg[0], column = _arg[1];
60
+ while (!((lineMap = this.lines[line]) || (line <= 0))) {
61
+ line--;
62
+ }
63
+ return lineMap && lineMap.sourceLocation(column);
64
+ };
65
+
66
+ SourceMap.prototype.generate = function(options, code) {
67
+ var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1;
68
+ if (options == null) {
69
+ options = {};
70
+ }
71
+ if (code == null) {
72
+ code = null;
73
+ }
74
+ writingline = 0;
75
+ lastColumn = 0;
76
+ lastSourceLine = 0;
77
+ lastSourceColumn = 0;
78
+ needComma = false;
79
+ buffer = "";
80
+ _ref = this.lines;
81
+ for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) {
82
+ lineMap = _ref[lineNumber];
83
+ if (lineMap) {
84
+ _ref1 = lineMap.columns;
85
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
86
+ mapping = _ref1[_j];
87
+ if (!(mapping)) {
88
+ continue;
89
+ }
90
+ while (writingline < mapping.line) {
91
+ lastColumn = 0;
92
+ needComma = false;
93
+ buffer += ";";
94
+ writingline++;
95
+ }
96
+ if (needComma) {
97
+ buffer += ",";
98
+ needComma = false;
99
+ }
100
+ buffer += this.encodeVlq(mapping.column - lastColumn);
101
+ lastColumn = mapping.column;
102
+ buffer += this.encodeVlq(0);
103
+ buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine);
104
+ lastSourceLine = mapping.sourceLine;
105
+ buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn);
106
+ lastSourceColumn = mapping.sourceColumn;
107
+ needComma = true;
108
+ }
109
+ }
110
+ }
111
+ v3 = {
112
+ version: 3,
113
+ file: options.generatedFile || '',
114
+ sourceRoot: options.sourceRoot || '',
115
+ sources: options.sourceFiles || [''],
116
+ names: [],
117
+ mappings: buffer
118
+ };
119
+ if (options.inline) {
120
+ v3.sourcesContent = [code];
121
+ }
122
+ return JSON.stringify(v3, null, 2);
123
+ };
124
+
125
+ VLQ_SHIFT = 5;
126
+
127
+ VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
128
+
129
+ VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
130
+
131
+ SourceMap.prototype.encodeVlq = function(value) {
132
+ var answer, nextChunk, signBit, valueToEncode;
133
+ answer = '';
134
+ signBit = value < 0 ? 1 : 0;
135
+ valueToEncode = (Math.abs(value) << 1) + signBit;
136
+ while (valueToEncode || !answer) {
137
+ nextChunk = valueToEncode & VLQ_VALUE_MASK;
138
+ valueToEncode = valueToEncode >> VLQ_SHIFT;
139
+ if (valueToEncode) {
140
+ nextChunk |= VLQ_CONTINUATION_BIT;
141
+ }
142
+ answer += this.encodeBase64(nextChunk);
143
+ }
144
+ return answer;
145
+ };
146
+
147
+ BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
148
+
149
+ SourceMap.prototype.encodeBase64 = function(value) {
150
+ return BASE64_CHARS[value] || (function() {
151
+ throw new Error("Cannot Base64 encode value: " + value);
152
+ })();
153
+ };
154
+
155
+ return SourceMap;
156
+
157
+ })();
158
+
159
+ module.exports = SourceMap;
160
+
161
+ }).call(this);
@@ -0,0 +1,21 @@
1
+ Copyright 2010 James Halliday (mail@substack.net)
2
+
3
+ This project is free software released under the MIT/X11 license:
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ var mkdirp = require('mkdirp');
2
+
3
+ mkdirp('/tmp/foo/bar/baz', function (err) {
4
+ if (err) console.error(err)
5
+ else console.log('pow!')
6
+ });
@@ -0,0 +1,82 @@
1
+ var path = require('path');
2
+ var fs = require('fs');
3
+
4
+ module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
5
+
6
+ function mkdirP (p, mode, f, made) {
7
+ if (typeof mode === 'function' || mode === undefined) {
8
+ f = mode;
9
+ mode = 0777 & (~process.umask());
10
+ }
11
+ if (!made) made = null;
12
+
13
+ var cb = f || function () {};
14
+ if (typeof mode === 'string') mode = parseInt(mode, 8);
15
+ p = path.resolve(p);
16
+
17
+ fs.mkdir(p, mode, function (er) {
18
+ if (!er) {
19
+ made = made || p;
20
+ return cb(null, made);
21
+ }
22
+ switch (er.code) {
23
+ case 'ENOENT':
24
+ mkdirP(path.dirname(p), mode, function (er, made) {
25
+ if (er) cb(er, made);
26
+ else mkdirP(p, mode, cb, made);
27
+ });
28
+ break;
29
+
30
+ // In the case of any other error, just see if there's a dir
31
+ // there already. If so, then hooray! If not, then something
32
+ // is borked.
33
+ default:
34
+ fs.stat(p, function (er2, stat) {
35
+ // if the stat fails, then that's super weird.
36
+ // let the original error be the failure reason.
37
+ if (er2 || !stat.isDirectory()) cb(er, made)
38
+ else cb(null, made);
39
+ });
40
+ break;
41
+ }
42
+ });
43
+ }
44
+
45
+ mkdirP.sync = function sync (p, mode, made) {
46
+ if (mode === undefined) {
47
+ mode = 0777 & (~process.umask());
48
+ }
49
+ if (!made) made = null;
50
+
51
+ if (typeof mode === 'string') mode = parseInt(mode, 8);
52
+ p = path.resolve(p);
53
+
54
+ try {
55
+ fs.mkdirSync(p, mode);
56
+ made = made || p;
57
+ }
58
+ catch (err0) {
59
+ switch (err0.code) {
60
+ case 'ENOENT' :
61
+ made = sync(path.dirname(p), mode, made);
62
+ sync(p, mode, made);
63
+ break;
64
+
65
+ // In the case of any other error, just see if there's a dir
66
+ // there already. If so, then hooray! If not, then something
67
+ // is borked.
68
+ default:
69
+ var stat;
70
+ try {
71
+ stat = fs.statSync(p);
72
+ }
73
+ catch (err1) {
74
+ throw err0;
75
+ }
76
+ if (!stat.isDirectory()) throw err0;
77
+ break;
78
+ }
79
+ }
80
+
81
+ return made;
82
+ };
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "mkdirp",
3
+ "description": "Recursively mkdir, like `mkdir -p`",
4
+ "version": "0.3.5",
5
+ "author": {
6
+ "name": "James Halliday",
7
+ "email": "mail@substack.net",
8
+ "url": "http://substack.net"
9
+ },
10
+ "main": "./index",
11
+ "keywords": [
12
+ "mkdir",
13
+ "directory"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "http://github.com/substack/node-mkdirp.git"
18
+ },
19
+ "scripts": {
20
+ "test": "tap test/*.js"
21
+ },
22
+ "devDependencies": {
23
+ "tap": "~0.4.0"
24
+ },
25
+ "license": "MIT",
26
+ "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n",
27
+ "readmeFilename": "readme.markdown",
28
+ "bugs": {
29
+ "url": "https://github.com/substack/node-mkdirp/issues"
30
+ },
31
+ "homepage": "https://github.com/substack/node-mkdirp",
32
+ "_id": "mkdirp@0.3.5",
33
+ "_from": "mkdirp@~0.3.5"
34
+ }