jekyll-webpack 0.1.2 → 0.2.0

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: e9e56e62d305675a60644d8cd096a91b0b1738dd4acf7d1782a79944d3a1eea5
4
- data.tar.gz: dab9f105e280cb11b48e0d2632c0e648757ef9a7236ea35224647484951412a0
3
+ metadata.gz: d8950c117cac046785121b78e1211c96c2f4ff14f1982cc5864c007600abe74c
4
+ data.tar.gz: 7d54401b026fe77b989e7c3f03930e4d356cfeef071cf61e7044fc7cd01cf5d2
5
5
  SHA512:
6
- metadata.gz: 57f621cf3eb1ba13eacd520da1b4f70ea0a312afa60a96ee75552beb724bb970bbef7b3f40ec3c234596f55148dfe3095fd77a0de1b0e0da509c9a80179d72f8
7
- data.tar.gz: 12f7e08a0a3c7a0f0e610a69e5c5b060bd2de8983b75467db8c5cc8b09f1696a24a56ee5e16512cfe41363febd87d4f929b3471e474ba42172bd50bb852358d9
6
+ metadata.gz: 663677f25c77ec5bdd8695eee148ebe5257fbc5f23bffd90bb3a4f9bd26e42c25d55adef1aab2a9c22711440ad786dc2b9624b676b5645d08a78237520cfd842
7
+ data.tar.gz: fa519caed15b050b873cae81b437d000d75423cbf980c9a10db8215cc5cd684e68dd09965dec92e5f9cd7f05d808b880c4365f35c01b4c41dc063d8edc7f908f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-webpack (0.1.1)
4
+ jekyll-webpack (0.1.2)
5
5
  jekyll
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -4,9 +4,9 @@ This plugin will allow you to build your assets with Webpack _after_ Jekyll has
4
4
 
5
5
  ## Why?
6
6
 
7
- This adds Webpack at a sane point in the build pipeline and will also allow you to parameterize your webpack and other JS config files by prepending them with front matter, before the compilation occurs. You can see a functioning excample in the `spec/fixtures` folder:-
7
+ This adds Webpack at a sane point in the build pipeline and will also allow you to parameterize your webpack and other JS config files by prepending them with front matter, before the compilation occurs. You can see a functioning example in the `spec/fixtures` folder:-
8
8
 
9
- There is a `_data/tailwind.yml` file in the fixure site that's picked up by adding a frontmatter declaration in `tailwind.config.yml`.
9
+ There is a `_data/tailwind.yml` file in the fixure site that's picked up by adding a frontmatter declaration in `tailwind.config.js`. This Tailwind config is in turn picked up by the outputted webpack config and parsed when webpack runs.
10
10
 
11
11
 
12
12
  ## Installation
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "jekyll/webpack/version"
4
4
  require "jekyll"
5
+ require "open3"
5
6
 
6
7
  module Jekyll
7
8
  module Webpack
@@ -9,9 +10,16 @@ module Jekyll
9
10
 
10
11
  def self.build(site)
11
12
  site_dest = site.dest
12
- Dir.chdir(site_dest) do
13
- `../node_modules/.bin/webpack`
14
- end
13
+
14
+ stdout, stderr, status = Open3.capture3(
15
+ "../node_modules/.bin/webpack",
16
+ chdir: File.expand_path(site_dest)
17
+ )
18
+
19
+ runtime_error = stdout =~ /error/i
20
+
21
+ raise Error, stderr if stderr.size > 0
22
+ raise Error, stdout if !runtime_error.nil?
15
23
  end
16
24
  end
17
25
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Webpack
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-webpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Martin