amd 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1db2e59efa1f2538a86201b136fc8c575100b6df
4
- data.tar.gz: 0849658743dddb48715249e9aa1c52503cef28c3
3
+ metadata.gz: 72c8920afe2d4f63490569806ef8ed20b3095325
4
+ data.tar.gz: 821a3009644c4511c9719e35b0b7dab4d7493c85
5
5
  SHA512:
6
- metadata.gz: 056b367c07e907de24feab815421565d597818f148362272fc4f80747a2df573c08871315cc5a5ba76e8548bd53369b1837e86ee2fe28675902028251cfa310c
7
- data.tar.gz: 823a90c77f55805050914d6de102b012304aa7dcc9ae3b11050dd9bd5fa55f58047b0b3ae24a557324a04da91345f933a4e051bc329e4077dfd08cbd743a9fae
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, ->
@@ -1,3 +1,3 @@
1
1
  module AMD
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
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
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-04-27 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails