jekyll-plugin-frontend-build 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: 5987ae6cd0b6ec9a535820159b20aeb7c00fc81fcc048cacf3fdc331e3fdbe24
4
- data.tar.gz: f18bef2460fc2be9649832969c329da34fe5d6c8d3489999f11d913236663ad9
3
+ metadata.gz: 145a1a178eea3f7a8d59eccf78a2138befcaadfa215a0822e162589623fc8d3d
4
+ data.tar.gz: 1ec4a88765739688e9067ca3160d615659eb76079c3e7317a923c51ef5e66886
5
5
  SHA512:
6
- metadata.gz: 26d8a757eb7bf218de513f964bfe9b8a3f5f04f53dd10aecedc9be3fe5b285faef8e91e1341499accd2456e9ded60fd745ab1d826df69adb64072cb1e921771b
7
- data.tar.gz: fbbc614a8650db76b6966d0165f12ba891c46f6f5b4159ff1bc1b46437dbb4676a93b55c80caac694e8d3864f0f238a94eb5232a665686ae5b52892227cacfd2
6
+ metadata.gz: 8c5c7cfa301c87e4a3d24ec0aeca0211e87dd012d74b92230edec50e7c8e9b510dd1732ccf5f250b990bd3d91eb35f800bc7ee5a8f5381417365c096b6d4e340
7
+ data.tar.gz: cb8e132d81e155c473005a4d7be82950e9e634e66625aa15db120ab2a6a706c44f02a827f94ed485daf5eea4c3d5036134ff241f494e28235a258793654e05ca
@@ -0,0 +1,8 @@
1
+ = Changelog
2
+
3
+ == 0.0.2
4
+
5
+ Now copying Babel polyfills into `/assets/js` for easy inclusion
6
+ in cases where things like `regeneratorRuntime` are used.
7
+ Added link:https://github.com/riboseinc/jekyll-plugin-frontend-build#referenceerror-regeneratorruntime-is-not-defined[relevant entry]
8
+ under Troubleshooting.
@@ -15,15 +15,12 @@ Current limitations:
15
15
 
16
16
  Caveats:
17
17
 
18
- * The output & source directories are hard-coded;
19
- if your site output directory is not `_site` this won’t work.
20
18
  * You may need to include Babel’s polyfill script explicitly.
21
19
 
22
20
  Roadmap:
23
21
 
24
- * Post-process the CSS with at least auto-prefixer
25
- * Combine front-end assets into a few packages (bulk of JS, bulk of CSS) and minify it
26
- * Glean site destination directory from configuration
22
+ * Post-process the CSS with at least auto-prefixer (https://github.com/riboseinc/jekyll-plugin-frontend-build/issues/2[#2])
23
+ * Combine front-end assets into a few packages (bulk of JS, bulk of CSS) and minify it (https://github.com/riboseinc/jekyll-plugin-frontend-build/issues/3[#3])
27
24
  * Make source asset directory (directories) configurable
28
25
  * (?) Use Web components, e.g. Polymer
29
26
 
@@ -92,20 +89,23 @@ for an example.
92
89
 
93
90
  === `ReferenceError: regeneratorRuntime is not defined`
94
91
 
95
- You may need to include Babel polyfills before your code. Example ways of doing this:
92
+ You may need to include Babel polyfills before your code.
96
93
 
97
- * If you’re getting this error in normal browser window context
94
+ The plugin copies the pollyfill under `_site/assets/js`,
95
+ so including it isn’t difficult.
98
96
 
99
- [source,html]
100
- ----
101
- <script src="/assets/js/babel-polyfill.js"></script>
102
- ----
103
-
104
- * If you’re getting this error in Web worker context
97
+ * If you’re getting this error in normal browser window context:
98
+ +
99
+ [source,html]
100
+ ----
101
+ <script src="/assets/js/babel-polyfill.js"></script>
102
+ ----
105
103
 
106
- [source,javascript]
107
- ----
108
- importScripts('/assets/js/babel-polyfill.js');
104
+ * If you’re getting this error in Web worker context:
105
+ +
106
+ [source,javascript]
107
+ ----
108
+ importScripts('/assets/js/babel-polyfill.js');
109
109
 
110
- // The rest of the code
111
- ----
110
+ // The rest of the code
111
+ ----
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'jekyll-plugin-frontend-build'
5
- s.version = '0.0.2'
5
+ s.version = '0.0.3'
6
6
  s.authors = ['Ribose Inc.']
7
7
  s.email = ['open.source@ribose.com']
8
8
 
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
14
14
 
15
- s.add_runtime_dependency 'jekyll', '~> 3.8'
15
+ s.add_runtime_dependency 'jekyll', '~> 4.0'
16
16
  s.add_development_dependency 'rake', '~> 12.0'
17
17
  s.add_development_dependency 'rubocop', '~> 0.50'
18
18
 
@@ -1,13 +1,13 @@
1
1
  Jekyll::Hooks.register :site, :post_write do |site|
2
- build_js()
2
+ build_js(site.config['destination'] || '_site')
3
3
  end
4
4
 
5
- def build_js()
5
+ def build_js(site_dest)
6
6
 
7
7
  # Copy Babel polyfills
8
- system('cp node_modules/@babel/polyfill/dist/polyfill.min.js _site/assets/js/babel-polyfill.js')
8
+ system("cp node_modules/@babel/polyfill/dist/polyfill.min.js #{site_dest}/assets/js/babel-polyfill.js")
9
9
 
10
10
  # Transpile JS assets
11
- system('./node_modules/.bin/babel _site/assets/js --out-dir _site/assets/js')
11
+ system("./node_modules/.bin/babel #{site_dest}/assets/js --out-dir #{site_dest}/assets/js")
12
12
 
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-plugin-frontend-build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2020-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.8'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.8'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - CHANGELOG.adoc
62
63
  - LICENSE.txt
63
64
  - README.adoc
64
65
  - develop/release
@@ -84,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  - !ruby/object:Gem::Version
85
86
  version: '0'
86
87
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.7.6.2
88
+ rubygems_version: 3.0.3
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Jekyll plugin that post-processes static assets with Babel