esperanto-source 0.6.14 → 0.6.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34ea30e832daccb54f2758d180f1380d1a5d269c
4
- data.tar.gz: 4f7242cb4ca85b340dfce306f7c6ee4e431aecda
3
+ metadata.gz: 073c79d73032cfa4bc9254ddee3bc518d1b23c9b
4
+ data.tar.gz: 2745f24714e53b4349b4a40392ed8568f8621ae9
5
5
  SHA512:
6
- metadata.gz: 3f3101dfa43c194c1a2ebf7420cd09017784d8b143afb0c9479ba1f6c9142ed3d6a3467ed73bbc362652270e989d430ee004679830fe41e04d75b0e6eb0d8a99
7
- data.tar.gz: f3d74b43abf38e95fe7740e866f9da382d9d95d247673687a642be05e7afed40e0e983f64969405714b661bc4914bfd0263de1b43c811d2bdca6dc73cfba1a1e
6
+ metadata.gz: 3c94906168751c248259d34c8a3ff5fe3f2cab5828fa01fea6c786d571442018752c83d2e3636e5b917c6e92dffb6dd2deb93504f9384fac10d5c6d817d907f5
7
+ data.tar.gz: 51b20b23bdfabd50989b65e0cc27e794580ab22a4018ec4d94d464dc40549e9ae00865654f32cd72e224dd057d719cca46560e8776789db90f02de509dd4c7eb
@@ -1,5 +1,5 @@
1
1
  module Esperanto
2
2
  module Source
3
- VERSION = '0.6.14'
3
+ VERSION = '0.6.15'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /*
2
- esperanto.js v0.6.14 - 2015-02-26
2
+ esperanto.js v0.6.15 - 2015-02-26
3
3
  http://esperantojs.org
4
4
 
5
5
  Released under the MIT License.
data/vendor/esperanto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- esperanto.js v0.6.14 - 2015-02-26
2
+ esperanto.js v0.6.15 - 2015-02-26
3
3
  http://esperantojs.org
4
4
 
5
5
  Released under the MIT License.
@@ -733,6 +733,30 @@ function populateExternalModuleImports ( bundle ) {
733
733
  });
734
734
  }
735
735
 
736
+ function getId ( m ) {
737
+ return m.id;
738
+ }
739
+
740
+ function getName ( m ) {
741
+ return m.name;
742
+ }
743
+
744
+ function quote ( str ) {
745
+ return "'" + JSON.stringify(str).slice(1, -1).replace(/'/g, "\\'") + "'";
746
+ }
747
+
748
+ function req ( path ) {
749
+ return 'require(' + quote(path) + ')';
750
+ }
751
+
752
+ function globalify ( name ) {
753
+ if ( /^__dep\d+__$/.test( name ) ) {
754
+ return 'undefined';
755
+ } else {
756
+ return 'global.' + name;
757
+ }
758
+ }
759
+
736
760
  function getRenamedImports ( mod ) {
737
761
  var renamed = [];
738
762
 
@@ -751,6 +775,7 @@ function getRenamedImports ( mod ) {
751
775
 
752
776
  function topLevelScopeConflicts ( bundle ) {
753
777
  var conflicts = {}, inBundle = {};
778
+ var importNames = bundle.externalModules.map( getName );
754
779
 
755
780
  bundle.modules.forEach( function(mod ) {
756
781
  var names = builtins
@@ -761,6 +786,8 @@ function topLevelScopeConflicts ( bundle ) {
761
786
  // all unattributed identifiers could collide with top scope
762
787
  .concat( getUnscopedNames( mod ) )
763
788
 
789
+ .concat( importNames )
790
+
764
791
  .concat( getRenamedImports( mod ) );
765
792
 
766
793
  if ( mod._exportsNamespace ) {
@@ -1644,30 +1671,6 @@ function template ( str ) {
1644
1671
  };
1645
1672
  }
1646
1673
 
1647
- function getId ( m ) {
1648
- return m.id;
1649
- }
1650
-
1651
- function getName ( m ) {
1652
- return m.name;
1653
- }
1654
-
1655
- function quote ( str ) {
1656
- return "'" + JSON.stringify(str).slice(1, -1).replace(/'/g, "\\'") + "'";
1657
- }
1658
-
1659
- function req ( path ) {
1660
- return 'require(' + quote(path) + ')';
1661
- }
1662
-
1663
- function globalify ( name ) {
1664
- if ( /^__dep\d+__$/.test( name ) ) {
1665
- return 'undefined';
1666
- } else {
1667
- return 'global.' + name;
1668
- }
1669
- }
1670
-
1671
1674
  var amd__introTemplate = template( 'define(<%= amdName %><%= paths %>function (<%= names %>) {\n\n' );
1672
1675
 
1673
1676
  function amd__amd ( mod, body, options ) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esperanto-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO