batman-rails-flo 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/lib/batman-rails-flo.rb +5 -0
- data/lib/batman_rails_flo/railtie.rb +9 -0
- data/lib/batman_rails_flo/tasks.rake +14 -0
- data/lib/batman_rails_flo/version.rb +3 -0
- data/vendor/assets/javascripts/batman_rails_flo/flo_server.js +67 -0
- data/vendor/assets/javascripts/batman_rails_flo/live_reload.js.coffee +129 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CNAME +1 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CONTRIBUTING.md +9 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/LICENSE +22 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/README +50 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/cake +7 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/coffee +7 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/browser.js +134 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/cake.js +112 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/coffee-script.js +335 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/command.js +569 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/grammar.js +631 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/helpers.js +252 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/lexer.js +926 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/nodes.js +3158 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/optparse.js +139 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/parser.js +724 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/register.js +66 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/repl.js +163 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/rewriter.js +475 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/sourcemap.js +161 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/LICENSE +21 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/examples/pow.js +6 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/index.js +82 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/package.json +34 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/readme.markdown +63 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/race.js +41 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/rel.js +32 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return.js +25 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return_sync.js +24 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/root.js +18 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/sync.js +32 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/package.json +50 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/register.js +1 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/LICENSE +30 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/PATENTS +23 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/README.md +124 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/bin/flo +26 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.html +57 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.js +205 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/style.css +334 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/connection.js +235 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/devtools.html +12 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/index.js +323 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logger.js +42 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logo.png +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/manifest.json +13 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/session.js +305 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/index.js +10 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/flo.js +226 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/server.js +94 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/README.md +66 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/index.js +437 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/LICENSE +23 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/README.md +218 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- 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
- 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
- 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
- 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
- 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
- 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
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- 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
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/package.json +40 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/defaults.js +274 -0
- 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
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/lib/walker.js +111 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/license +13 -0
- 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
- 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
- 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
- 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
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/package.json +34 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/readme.md +77 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/package.json +36 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/readme.md +52 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/LICENSE +55 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/main.js +128 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/package.json +34 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/readme.mkd +72 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/d/t +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/t +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitor.js +31 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitorRootDirectory.js +28 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_watchTree.js +20 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/package.json +45 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/test/test.js +243 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/CHANGELOG.md +81 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/LICENSE +177 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/Makefile +11 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/README.md +245 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/binding.gyp +14 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Makefile +355 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/linker.lock +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/validation/src/validation.o +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/xor/src/xor.o +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/validation.node +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/xor.node +0 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/binding.Makefile +6 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/config.gypi +115 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/gyp-mac-tool +512 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/validation.target.mk +154 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/xor.target.mk +154 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/index.js +1 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/install.js +31 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Constants.js +23 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Deprecation.js +38 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.fallback.js +12 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.js +18 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketClient.js +359 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketConnection.js +717 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketFrame.js +282 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRequest.js +478 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouter.js +154 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouterRequest.js +59 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketServer.js +216 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/utils.js +7 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/websocket.js +11 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.fallback.js +13 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.js +18 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/package.json +43 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/validation.cc +144 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/xor.cpp +86 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/FastBufferList.js +192 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/LICENSE +18 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/ctio-faster.js +1126 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/package.json +25 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/browser_websocket.js +63 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/connection_test.js +57 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/logger_mock.js +15 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/session_test.js +194 -0
- data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/server/flo_test.js +211 -0
- data/vendor/assets/javascripts/batman_rails_flo/package.json +15 -0
- data/vendor/assets/javascripts/batman_rails_flo/reload_event_handler.js.coffee +56 -0
- metadata +232 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
var mkdirp = require('../');
|
2
|
+
var path = require('path');
|
3
|
+
var fs = require('fs');
|
4
|
+
var test = require('tap').test;
|
5
|
+
|
6
|
+
test('umask sync modes', function (t) {
|
7
|
+
t.plan(2);
|
8
|
+
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
9
|
+
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
10
|
+
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
|
11
|
+
|
12
|
+
var file = '/tmp/' + [x,y,z].join('/');
|
13
|
+
|
14
|
+
try {
|
15
|
+
mkdirp.sync(file);
|
16
|
+
} catch (err) {
|
17
|
+
t.fail(err);
|
18
|
+
return t.end();
|
19
|
+
}
|
20
|
+
|
21
|
+
path.exists(file, function (ex) {
|
22
|
+
if (!ex) t.fail('file not created')
|
23
|
+
else fs.stat(file, function (err, stat) {
|
24
|
+
if (err) t.fail(err)
|
25
|
+
else {
|
26
|
+
t.equal(stat.mode & 0777, (0777 & (~process.umask())));
|
27
|
+
t.ok(stat.isDirectory(), 'target not a directory');
|
28
|
+
t.end();
|
29
|
+
}
|
30
|
+
});
|
31
|
+
});
|
32
|
+
});
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "coffee-script",
|
3
|
+
"description": "Unfancy JavaScript",
|
4
|
+
"keywords": [
|
5
|
+
"javascript",
|
6
|
+
"language",
|
7
|
+
"coffeescript",
|
8
|
+
"compiler"
|
9
|
+
],
|
10
|
+
"author": {
|
11
|
+
"name": "Jeremy Ashkenas"
|
12
|
+
},
|
13
|
+
"version": "1.7.1",
|
14
|
+
"license": "MIT",
|
15
|
+
"engines": {
|
16
|
+
"node": ">=0.8.0"
|
17
|
+
},
|
18
|
+
"directories": {
|
19
|
+
"lib": "./lib/coffee-script"
|
20
|
+
},
|
21
|
+
"main": "./lib/coffee-script/coffee-script",
|
22
|
+
"bin": {
|
23
|
+
"coffee": "./bin/coffee",
|
24
|
+
"cake": "./bin/cake"
|
25
|
+
},
|
26
|
+
"scripts": {
|
27
|
+
"test": "node ./bin/cake test"
|
28
|
+
},
|
29
|
+
"homepage": "http://coffeescript.org",
|
30
|
+
"bugs": {
|
31
|
+
"url": "https://github.com/jashkenas/coffee-script/issues"
|
32
|
+
},
|
33
|
+
"repository": {
|
34
|
+
"type": "git",
|
35
|
+
"url": "git://github.com/jashkenas/coffee-script.git"
|
36
|
+
},
|
37
|
+
"devDependencies": {
|
38
|
+
"uglify-js": "~2.2",
|
39
|
+
"jison": ">=0.2.0",
|
40
|
+
"highlight.js": "~8.0.0",
|
41
|
+
"underscore": "~1.5.2"
|
42
|
+
},
|
43
|
+
"dependencies": {
|
44
|
+
"mkdirp": "~0.3.5"
|
45
|
+
},
|
46
|
+
"readme": " {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n { }{ }{ { } / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( { } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n If you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Or, if you don't wish to use npm:\n sudo bin/cake install\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n Top 100 contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n",
|
47
|
+
"readmeFilename": "README",
|
48
|
+
"_id": "coffee-script@1.7.1",
|
49
|
+
"_from": "coffee-script@"
|
50
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
require('./lib/coffee-script/register');
|
@@ -0,0 +1,30 @@
|
|
1
|
+
BSD License
|
2
|
+
|
3
|
+
For "fb-flo" software
|
4
|
+
|
5
|
+
Copyright (c) 2014, Facebook, Inc. All rights reserved.
|
6
|
+
|
7
|
+
Redistribution and use in source and binary forms, with or without modification,
|
8
|
+
are permitted provided that the following conditions are met:
|
9
|
+
|
10
|
+
* Redistributions of source code must retain the above copyright notice, this
|
11
|
+
list of conditions and the following disclaimer.
|
12
|
+
|
13
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
14
|
+
this list of conditions and the following disclaimer in the documentation
|
15
|
+
and/or other materials provided with the distribution.
|
16
|
+
|
17
|
+
* Neither the name Facebook nor the names of its contributors may be used to
|
18
|
+
endorse or promote products derived from this software without specific
|
19
|
+
prior written permission.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
22
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
23
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
25
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
26
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
27
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
28
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Additional Grant of Patent Rights
|
2
|
+
|
3
|
+
"Software" means the "fb-flo" software distributed by Facebook, Inc.
|
4
|
+
|
5
|
+
Facebook hereby grants you a perpetual, worldwide, royalty-free, non-exclusive,
|
6
|
+
irrevocable (subject to the termination provision below) license under any
|
7
|
+
rights in any patent claims owned by Facebook, to make, have made, use, sell,
|
8
|
+
offer to sell, import, and otherwise transfer the Software. For avoidance of
|
9
|
+
doubt, no license is granted under Facebook’s rights in any patent claims that
|
10
|
+
are infringed by (i) modifications to the Software made by you or a third party,
|
11
|
+
or (ii) the Software in combination with any software or other technology
|
12
|
+
provided by you or a third party.
|
13
|
+
|
14
|
+
The license granted hereunder will terminate, automatically and without notice,
|
15
|
+
for anyone that makes any claim (including by filing any lawsuit, assertion or
|
16
|
+
other action) alleging (a) direct, indirect, or contributory infringement or
|
17
|
+
inducement to infringe any patent: (i) by Facebook or any of its subsidiaries or
|
18
|
+
affiliates, whether or not such claim is related to the Software, (ii) by any
|
19
|
+
party if such claim arises in whole or in part from any software, product or
|
20
|
+
service of Facebook or any of its subsidiaries or affiliates, whether or not
|
21
|
+
such claim is related to the Software, or (iii) by any party relating to the
|
22
|
+
Software; or (b) that any right in any patent claim of Facebook is invalid or
|
23
|
+
unenforceable.
|
@@ -0,0 +1,124 @@
|
|
1
|
+
fb-flo
|
2
|
+
---
|
3
|
+
|
4
|
+
fb-flo is a Chrome extension that lets you modify running apps without reloading. It's easy to integrate with your build system, dev environment, and can be used with your favorite editor.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
fb-flo is made up of a server and client component. This will guide through configuring your server for your project and installing the Chrome extension.
|
9
|
+
|
10
|
+
### 1. Configure fb-flo server
|
11
|
+
|
12
|
+
```
|
13
|
+
$ npm install fb-flo
|
14
|
+
```
|
15
|
+
|
16
|
+
fb-flo exports a single `fb-flo` function to start the server. Here is an example where you have your source JavaScript and CSS files in the root directory and your build step involves bundling both into a respective `bundle.js`, `bundle.css`.
|
17
|
+
|
18
|
+
```js
|
19
|
+
var flo = require('fb-flo'),
|
20
|
+
path = require('path'),
|
21
|
+
fs = require('fs');
|
22
|
+
|
23
|
+
var server = flo(
|
24
|
+
sourceDirToWatch,
|
25
|
+
{
|
26
|
+
port: 8888,
|
27
|
+
host: 'localhost',
|
28
|
+
verbose: false,
|
29
|
+
glob: [
|
30
|
+
// All JS files in `sourceDirToWatch` and subdirectories
|
31
|
+
'**/*.js',
|
32
|
+
// All CSS files in `sourceDirToWatch` and subdirectories
|
33
|
+
'**/*.css'
|
34
|
+
]
|
35
|
+
},
|
36
|
+
function resolver(filepath, callback) {
|
37
|
+
// 1. Call into your compiler / bundler.
|
38
|
+
// 2. Assuming that `bundle.js` is your output file, update `bundle.js`
|
39
|
+
// and `bundle.css` when a JS or CSS file changes.
|
40
|
+
callback({
|
41
|
+
resourceURL: 'bundle.js' + path.extname(filepath),
|
42
|
+
// any string-ish value is acceptable. i.e. strings, Buffers etc.
|
43
|
+
contents: fs.readFileSync(filepath)
|
44
|
+
});
|
45
|
+
}
|
46
|
+
);
|
47
|
+
```
|
48
|
+
|
49
|
+
`flo` takes the following arguments.
|
50
|
+
|
51
|
+
* `sourceDirToWatch`: absolute or relative path to the directory to watch that contains the source code that will be built.
|
52
|
+
* `options` hash of options:
|
53
|
+
* `port` port to start the server on (defaults to 8888).
|
54
|
+
* `host` to listen on.
|
55
|
+
* `verbose` `true` or `false` value indicating if flo should be noisy.
|
56
|
+
* `glob` a glob string or array of globs to match against the files to watch.
|
57
|
+
* `useFilePolling` some platforms that do not support native file watching, you can force the file watcher to work in polling mode.
|
58
|
+
* `pollingInterval` if in polling mode (useFilePolling) then you can set the interval at which to poll for file changes.
|
59
|
+
* `resolver` a function to map between files and resources.
|
60
|
+
|
61
|
+
The resolver callback is called with two arguments:
|
62
|
+
|
63
|
+
* `filepath` path to the file that changed relative to the watched directory.
|
64
|
+
* `callback` called to update a resource file in the browser. Should be called with an object with the following properties:
|
65
|
+
* `resourceURL` used as the resource identifier in the browser.
|
66
|
+
* `contents` any string-ish value representing the source of the updated file. i.e. strings, Buffers etc.
|
67
|
+
* `reload` (optional) forces a full page reload. Use this if you're sure the changed code cannot be hotswapped.
|
68
|
+
* `match` (optional, defaults to: indexOf) identifies the matching function to be performed on the resource URL in the browser. Could be one of the following:
|
69
|
+
* `"equal"` test the updated resource `resourceURL` against existing browser resources using an equality check.
|
70
|
+
* `"indexOf"` use `String.prototype.indexOf` check
|
71
|
+
* `/regexp/` a regexp object to exec.
|
72
|
+
|
73
|
+
### 2. Install the Chrome Extension
|
74
|
+
|
75
|
+
Grab the [fb-flo Chrome extension](https://chrome.google.com/webstore/detail/ahkfhobdidabddlalamkkiafpipdfchp). This will add a new tab in your Chrome DevTools called 'flo'.
|
76
|
+
|
77
|
+
### 3. Activate fb-flo
|
78
|
+
|
79
|
+
To activate fb-flo from the browser:
|
80
|
+
|
81
|
+
* Open Chrome DevTools.
|
82
|
+
* Click on the new 'fb-flo' pane.
|
83
|
+
* Click on 'Activate for this site'
|
84
|
+
|
85
|
+
See screenshot:
|
86
|
+
|
87
|
+
![](http://i.imgur.com/SamY32i.png)
|
88
|
+
|
89
|
+
### Example
|
90
|
+
|
91
|
+
Say you have a Makefile program that builds your JavaScript and CSS into `build/build.js` and `build/build.css` respectively, this how you'd configure your fb-flo server:
|
92
|
+
|
93
|
+
```js
|
94
|
+
var flo = require('fb-flo');
|
95
|
+
var fs = require('fs');
|
96
|
+
var exec = require('child_process').exec;
|
97
|
+
|
98
|
+
var server = flo('./lib/', {
|
99
|
+
port: 8888,
|
100
|
+
dir: './lib/',
|
101
|
+
glob: ['./lib/**/*.js', './lib/**/*.css']
|
102
|
+
}, resolver);
|
103
|
+
|
104
|
+
server.once('ready', function() {
|
105
|
+
console.log('Ready!');
|
106
|
+
});
|
107
|
+
|
108
|
+
function resolver(filepath, callback) {
|
109
|
+
exec('make', function (err) {
|
110
|
+
if (err) throw err;
|
111
|
+
if (filepath.match(/\.js$/)) {
|
112
|
+
callback({
|
113
|
+
resourceURL: 'build/build.js',
|
114
|
+
contents: fs.readFileSync('build/build.js').toString()
|
115
|
+
})
|
116
|
+
} else {
|
117
|
+
callback({
|
118
|
+
resourceURL: 'build/build.css',
|
119
|
+
contents: fs.readFileSync('build/build.css').toString()
|
120
|
+
})
|
121
|
+
}
|
122
|
+
});
|
123
|
+
}
|
124
|
+
```
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
var flo = require('../');
|
4
|
+
var path = require('path');
|
5
|
+
|
6
|
+
var file = path.join(
|
7
|
+
process.cwd(),
|
8
|
+
process.argv[2] || 'flofile.js'
|
9
|
+
);
|
10
|
+
|
11
|
+
var config;
|
12
|
+
try {
|
13
|
+
config = require(file);
|
14
|
+
} catch (e) {
|
15
|
+
config = {};
|
16
|
+
}
|
17
|
+
|
18
|
+
config.options = config.options || {};
|
19
|
+
|
20
|
+
var f = flo(
|
21
|
+
config.options.dir || process.cwd(),
|
22
|
+
config.options,
|
23
|
+
config.resolver
|
24
|
+
);
|
25
|
+
|
26
|
+
f.once('ready', config.ready || function() {});
|
data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.html
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>flo configuration</title>
|
5
|
+
<link rel="stylesheet" href="style.css" />
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<main>
|
9
|
+
<nav>
|
10
|
+
<ol>
|
11
|
+
<li data-tab="status-log" class="selected">Status & Log</li>
|
12
|
+
<li data-tab="config">Configuration</li>
|
13
|
+
</ol>
|
14
|
+
</nav>
|
15
|
+
<section class="status-log tab selected">
|
16
|
+
<h1>Status</h1>
|
17
|
+
<div class="status">
|
18
|
+
<span class="indicator disabled"></span>
|
19
|
+
<span class="text"></span>
|
20
|
+
<button class="action enable hidden">Activate for this site</button>
|
21
|
+
<button class="action retry hidden">Try again</button>
|
22
|
+
</div>
|
23
|
+
<h1>Log <small><a class="report-bug" href="https://github.com/facebook/fb-flo/issues/new" target="_blank">Report a bug</a></small></h1>
|
24
|
+
<div class="log-box" contenteditable>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
</section>
|
28
|
+
<section class="config tab">
|
29
|
+
<h1>Configure flo</h1>
|
30
|
+
<form>
|
31
|
+
<section>
|
32
|
+
<div class="hostnames-container">
|
33
|
+
<label for="hostnames">Sites</label>
|
34
|
+
<p class="desc">Sites to start flo for.</p>
|
35
|
+
<div class="hostnames-options">
|
36
|
+
<ol class="hostnames"></ol>
|
37
|
+
<button class="add">Add New Site</button>
|
38
|
+
</div>
|
39
|
+
<div class="hostname-form hidden">
|
40
|
+
<label>Add Site</label>
|
41
|
+
<div><input name="pattern" placeholder="* hostname pattern" title="Either the full string to match or a regexp in the form of /example\.com/gi." /></div>
|
42
|
+
<div><input name="server" placeholder="flo server hostname" /></div>
|
43
|
+
<div><input name="port" placeholder="flo server port" /> <button>Save</button></div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<div class="port-container">
|
47
|
+
<label for="default-port">Default flo server port number:</label>
|
48
|
+
<p class="desc">The default port number your flo server would be listening on (you can set port number per site).</p>
|
49
|
+
<input name="default-port" />
|
50
|
+
</div>
|
51
|
+
</section>
|
52
|
+
</form>
|
53
|
+
</section>
|
54
|
+
</main>
|
55
|
+
<script src="configure.js"></script>
|
56
|
+
</body>
|
57
|
+
</html>
|
data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.js
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2014, Facebook, Inc.
|
3
|
+
* All rights reserved.
|
4
|
+
*
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
8
|
+
*/
|
9
|
+
|
10
|
+
(function () {
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Utils.
|
14
|
+
*/
|
15
|
+
|
16
|
+
var $ = document.querySelector.bind(document);
|
17
|
+
|
18
|
+
function $$() {
|
19
|
+
var els = document.querySelectorAll.apply(document, arguments);
|
20
|
+
return [].slice.call(els);
|
21
|
+
}
|
22
|
+
|
23
|
+
function triggerEvent(type, data) {
|
24
|
+
var event = new Event('flo_' + type);
|
25
|
+
event.data = data;
|
26
|
+
window.dispatchEvent(event);
|
27
|
+
return event;
|
28
|
+
};
|
29
|
+
|
30
|
+
function listenToEvent(type, callback) {
|
31
|
+
window.addEventListener('flo_' + type, callback);
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Navigation.
|
36
|
+
*/
|
37
|
+
|
38
|
+
$('nav').onclick = function(e) {
|
39
|
+
if (e.target.nodeName !== 'LI') return;
|
40
|
+
$$('.selected').forEach(function(el) {
|
41
|
+
el.classList.remove('selected');
|
42
|
+
});
|
43
|
+
e.target.classList.add('selected');
|
44
|
+
var tabClass = e.target.getAttribute('data-tab');
|
45
|
+
var tabEl = $('.' + tabClass);
|
46
|
+
tabEl && tabEl.classList.add('selected');
|
47
|
+
};
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Storage.
|
51
|
+
*/
|
52
|
+
|
53
|
+
function save() {
|
54
|
+
var sites = $$('.hostnames .item span').map(function(el) {
|
55
|
+
return {
|
56
|
+
pattern: el.dataset.pattern,
|
57
|
+
server: el.dataset.server,
|
58
|
+
port: el.dataset.port
|
59
|
+
};
|
60
|
+
});
|
61
|
+
var port = $('input[name="default-port"').value.trim();
|
62
|
+
triggerEvent('config_changed',{
|
63
|
+
port: port,
|
64
|
+
sites: sites
|
65
|
+
});
|
66
|
+
}
|
67
|
+
|
68
|
+
function load(config) {
|
69
|
+
$('.hostnames').innerHTML = '';
|
70
|
+
config.sites.forEach(function(site) {
|
71
|
+
$('.hostnames').appendChild(createHostnameOption(site));
|
72
|
+
});
|
73
|
+
$('input[name="default-port"]').value = config.port;
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Templates.
|
78
|
+
*/
|
79
|
+
|
80
|
+
function createHostnameOption(item) {
|
81
|
+
var option = document.createElement('li');
|
82
|
+
var text = document.createElement('span');
|
83
|
+
var remove = document.createElement('a');
|
84
|
+
remove.textContent = 'x';
|
85
|
+
remove.classList.add('remove');
|
86
|
+
text.textContent = item.pattern;
|
87
|
+
text.dataset.pattern = item.pattern;
|
88
|
+
text.dataset.port = item.port;
|
89
|
+
text.dataset.server = item.server;
|
90
|
+
option.appendChild(text);
|
91
|
+
option.appendChild(remove);
|
92
|
+
option.classList.add('item');
|
93
|
+
return option;
|
94
|
+
}
|
95
|
+
|
96
|
+
function createLogItem(level, str) {
|
97
|
+
var div = document.createElement('div');
|
98
|
+
div.classList.add('loglevel-' + level);
|
99
|
+
div.textContent = str;
|
100
|
+
return div;
|
101
|
+
}
|
102
|
+
|
103
|
+
function showHostnameForm(callback) {
|
104
|
+
var form = $('.hostname-form');
|
105
|
+
form.classList.remove('hidden');
|
106
|
+
form.querySelector('button').onclick = function() {
|
107
|
+
var pattern = form.querySelector('[name=pattern]').value.trim();
|
108
|
+
if (!pattern) {
|
109
|
+
form.querySelector('[name=pattern]').classList.add('red');
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
|
113
|
+
var item = {
|
114
|
+
pattern: pattern,
|
115
|
+
server: form.querySelector('[name=server]').value.trim(),
|
116
|
+
port: form.querySelector('[name=port]').value.trim()
|
117
|
+
};
|
118
|
+
|
119
|
+
this.onclick = null;
|
120
|
+
form.classList.add('hidden');
|
121
|
+
$$('.hostname-form input').forEach(function(input) {
|
122
|
+
input.classList.remove('red');
|
123
|
+
input.value = '';
|
124
|
+
});
|
125
|
+
|
126
|
+
callback(item);
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Event handlers.
|
132
|
+
*/
|
133
|
+
|
134
|
+
$('form').onsubmit = function (e) {
|
135
|
+
e.preventDefault();
|
136
|
+
};
|
137
|
+
|
138
|
+
$('button.add').onclick = function () {
|
139
|
+
showHostnameForm(function(item) {
|
140
|
+
var option = createHostnameOption(item);
|
141
|
+
$('.hostnames').appendChild(option);
|
142
|
+
save();
|
143
|
+
});
|
144
|
+
};
|
145
|
+
|
146
|
+
$('.hostnames').onclick = function (e) {
|
147
|
+
if (e.target.classList.contains('remove')) {
|
148
|
+
e.target.parentNode.parentNode.removeChild(e.target.parentNode);
|
149
|
+
save();
|
150
|
+
}
|
151
|
+
};
|
152
|
+
|
153
|
+
$('form').onchange = save;
|
154
|
+
|
155
|
+
var prevStatus = 'disabled';
|
156
|
+
listenToEvent('status_change', function(e) {
|
157
|
+
var data = e.data;
|
158
|
+
var indicator = $('.status .indicator')
|
159
|
+
indicator.classList.remove(prevStatus);
|
160
|
+
indicator.classList.add(data.type);
|
161
|
+
prevStatus = data.type;
|
162
|
+
$('.status .text').textContent = data.text;
|
163
|
+
$$('.status .action').forEach(function(el) {
|
164
|
+
el.classList.add('hidden');
|
165
|
+
});
|
166
|
+
if (data.action) {
|
167
|
+
$('.status .' + data.action).classList.remove('hidden');
|
168
|
+
}
|
169
|
+
});
|
170
|
+
|
171
|
+
$('.action.retry').onclick = function() {
|
172
|
+
triggerEvent('retry');
|
173
|
+
};
|
174
|
+
|
175
|
+
$('.action.enable').onclick = function() {
|
176
|
+
triggerEvent('enable_for_host');
|
177
|
+
};
|
178
|
+
|
179
|
+
listenToEvent('load', function(e) {
|
180
|
+
load(e.data);
|
181
|
+
});
|
182
|
+
|
183
|
+
var logs = '';
|
184
|
+
|
185
|
+
listenToEvent('log', function(e) {
|
186
|
+
var level = e.data[0];
|
187
|
+
var args = e.data[1];
|
188
|
+
var message = args.map(function(a) {
|
189
|
+
return a.toString()
|
190
|
+
}).join(' ');
|
191
|
+
|
192
|
+
var item = createLogItem(
|
193
|
+
level,
|
194
|
+
message
|
195
|
+
);
|
196
|
+
var box = $('.log-box');
|
197
|
+
box.appendChild(item);
|
198
|
+
box.scrollTop = box.scrollHeight;
|
199
|
+
|
200
|
+
logs += '\n' + '[' + level + ']' + message;
|
201
|
+
var report = $('.report-bug');
|
202
|
+
report.search = 'title=' + 'Report from extension'
|
203
|
+
+ '&body=```' + logs + '\n```';
|
204
|
+
});
|
205
|
+
})();
|