jekyll-importmap 0.1.1 → 0.1.3

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
  SHA256:
3
- metadata.gz: 1f846c42361c7da6b6bac17de40f7d49d371d492edf7cedaee988aaa8acf8736
4
- data.tar.gz: 4533b6d72f8cd5d654ae602f527eb9c5e6e583f10c4d76895f47f32b486ea96c
3
+ metadata.gz: ead9e5ef88119687765f61cdfd463ee731c94b78864a29f63220ea3ecc694336
4
+ data.tar.gz: b0844196067dbb1cd631738fcbdb1d909c118827bafe441fee55dfc74e8412f1
5
5
  SHA512:
6
- metadata.gz: 56dac94721fadb3a3be47564011703297c7abb6dedd81e263031d589d9c9bcd83400c58f37e3f13dd00f0e3444b14d0d97f9855aebe502e8af424359d7c81db0
7
- data.tar.gz: ea08f250e99326219589c8f94344e713d557b765b6efe00845b146ff91daadeab77e356d166cf4c2085dfd01e33e55f1b51077d6814fc2f03a7cbfe98057430d
6
+ metadata.gz: ebfa452243f27acd9b091051d57b9ef21f670c979e06b5257f2b5384d7bb32901c4efc098341313c708adf0036822495753a2c877cd51a32ffc7cd6e82038c5a
7
+ data.tar.gz: ef39d2ea8b94d535658dd910c11daef2856e222c5a07aa5babc5a51ee7efa47266f6086015633c6284c2aaa02b2ebe2b0e4b55d6df111c2d61144bcc507f00d0
@@ -6,12 +6,30 @@ module Jekyll::Importmap
6
6
  'https://' + self.url + JS_PATH + '/' + path
7
7
  end
8
8
 
9
- def self.url
10
- if Jekyll.configuration['port'] && Jekyll.configuration['port'].length > 0
11
- Jekyll.configuration['host'] + ':' + Jekyll.configuration['port']
9
+ def self.host_or_url
10
+ if Jekyll.configuration['url']
11
+ Jekyll.configuration['url']
12
12
  else
13
13
  Jekyll.configuration['host']
14
14
  end
15
15
  end
16
+ def self.base_url
17
+ if Jekyll.configuration['baseurl']
18
+ '/' + Jekyll.configuration['baseurl']
19
+ else
20
+ ''
21
+ end
22
+ end
23
+ def self.port
24
+ if Jekyll.configuration['port'] && Jekyll.configuration['port'].length > 0
25
+ ':' + Jekyll.configuration['port']
26
+ else
27
+ ''
28
+ end
29
+ end
30
+
31
+ def self.url
32
+ self.host_or_url + self.port + self.base_url
33
+ end
16
34
  end
17
35
  end
@@ -5,6 +5,6 @@ module Liquid; class Tag; end; end
5
5
 
6
6
  module Jekyll
7
7
  class ImportmapTag < Liquid::Tag
8
- VERSION = "0.1.1"
8
+ VERSION = "0.1.3"
9
9
  end
10
10
  end
@@ -18,7 +18,7 @@ module Jekyll
18
18
  super
19
19
  #root_path = Pathname.new(Jekyll.configuration['source']) + '/'
20
20
  root_path = Dir.pwd + '/'
21
- @importmap = Jekyll::Importmap::Map.new.draw(root_path.join(IMPORTMAP_PATH))
21
+ @importmap = Jekyll::Importmap::Map.new.draw(root_path.concat(IMPORTMAP_PATH))
22
22
  @entry_point = "application"
23
23
  end
24
24
 
@@ -47,7 +47,7 @@ module Jekyll
47
47
  Array(paths).collect {|p| %(<link rel="modulepreload" href="#{p}">)}.join('\n')
48
48
  end
49
49
  def import_module_tag
50
- imports = Array(@entry_points).collect {|e| %(import '#{e}')}.join('\n')
50
+ imports = Array(*@entry_point).collect {|e| %(import '#{e}')}.join('\n')
51
51
  "<script type='module'>#{imports}</script>"
52
52
  end
53
53
  def es_module_shim_tag
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-importmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Kidd