amd 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/amd/amd.js.coffee.erb +6 -3
- data/lib/amd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72c8920afe2d4f63490569806ef8ed20b3095325
|
4
|
+
data.tar.gz: 821a3009644c4511c9719e35b0b7dab4d7493c85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eab902e99afcdfda5352ad96032836ba560296be785347e1ba0f5615ebd7bb27fd5e06126537144a17d88b540fefb8c99bbe05af37578fd311944131628c8fa0
|
7
|
+
data.tar.gz: 7020a7b5a9f94f548f1674f12e1800ac69fa2c5f07f56972602fa86a300384fa31a32c8fd28446e7175ae1f6858c239190f440002cfecfca6e2fdccbbd263331
|
@@ -4,6 +4,7 @@ window.mod_to_load_count = 0
|
|
4
4
|
|
5
5
|
# Guess the js module to load from the action name
|
6
6
|
window.guess_module = ->
|
7
|
+
window.mod_to_load_count = 0
|
7
8
|
action_module = $("body").data('action');
|
8
9
|
require action_module
|
9
10
|
|
@@ -68,7 +69,7 @@ window.define = (name, deps, fn) ->
|
|
68
69
|
|
69
70
|
if window.mod_to_load_count == 0
|
70
71
|
$('body').trigger('dependencies_loaded')
|
71
|
-
|
72
|
+
console.log("shiiiit")
|
72
73
|
console.groupEnd('Define ' + name);
|
73
74
|
#return fn.apply(fn, fetched_modules)
|
74
75
|
|
@@ -76,12 +77,14 @@ window.define = (name, deps, fn) ->
|
|
76
77
|
window.require = (module_name) ->
|
77
78
|
path = to_module_path(module_name)
|
78
79
|
window.mod_to_load_count = window.mod_to_load_count + 1
|
79
|
-
|
80
|
+
console.log("requiring")
|
80
81
|
if window.mod_to_load_count == 1
|
82
|
+
console.log("main_module")
|
81
83
|
# We are at the main module require block
|
82
84
|
$('body').on 'dependencies_loaded', ->
|
85
|
+
console.log("handler")
|
83
86
|
window.run_module module_name
|
84
|
-
|
87
|
+
$(document).trigger("amd:done")
|
85
88
|
|
86
89
|
if path != undefined
|
87
90
|
fetch_js path, ->
|
data/lib/amd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|