jekyll-webmention_io 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/generators/compile_js.rb +11 -6
- data/lib/jekyll/webmention_io/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: 8384ba7ad51bbe18a21f830e90aab4f0c1e4bb33
|
4
|
+
data.tar.gz: 95f1cb67e98cac5fdea2e17cd7f33928692d2589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5102808f75f46d32984404e669f4074024b0b69606d1902522dab96c58f31dafac6a1342d584e5fc5303062017a71923c78a95ffcbbf49ac7dabc5ba6e2a2988
|
7
|
+
data.tar.gz: 78c3a026e344a1ec7f3959309b701cce599ba842ad01f4b9ff92c0cec7ca02bbb2be572e50b14c4e9187c26684caa6a0b5b2a164d1f8ee9aecc3e5cf5405c411
|
@@ -9,6 +9,12 @@ require 'uglifier'
|
|
9
9
|
|
10
10
|
module Jekyll
|
11
11
|
module WebmentionIO
|
12
|
+
class JavaScriptFile < StaticFile
|
13
|
+
def destination_rel_dir
|
14
|
+
Jekyll::WebmentionIO::config['js']['destination'] || '/js/'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
12
18
|
using StringInflection
|
13
19
|
class CompileJS < Generator
|
14
20
|
|
@@ -57,15 +63,14 @@ module Jekyll
|
|
57
63
|
javascript = Uglifier.new(uglify_config).compile(javascript)
|
58
64
|
end
|
59
65
|
|
60
|
-
# Generate the file
|
61
|
-
source_file_destination = "#{site.config['source']}/#{config['destination']}"
|
62
|
-
Dir.mkdir( source_file_destination ) unless File.exists?( source_file_destination )
|
66
|
+
# Generate the file
|
63
67
|
file_name = 'JekyllWebmentionIO.js'
|
68
|
+
source_file_destination = ( config['source'] == false ? Dir.mktmpdir : "#{site.config['source']}/#{config['destination']}" )
|
69
|
+
puts source_file_destination
|
70
|
+
Dir.mkdir( source_file_destination ) unless File.exists?( source_file_destination )
|
64
71
|
File.open("#{source_file_destination}/#{file_name}", 'w') { |f| f.write( javascript ) }
|
65
|
-
|
66
72
|
unless config['deploy'] == false
|
67
|
-
|
68
|
-
js_file = StaticFile.new(site, site.config['source'], config['destination'], file_name)
|
73
|
+
js_file = Jekyll::WebmentionIO::JavaScriptFile.new(site, source_file_destination, '', file_name)
|
69
74
|
site.static_files << js_file
|
70
75
|
end
|
71
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-webmention_io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Gustafson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|