webpack_driver 0.3.7 → 0.4.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
  SHA1:
3
- metadata.gz: 7ee447f96c0c8eb8d05386fa2245470bc244a515
4
- data.tar.gz: b3795304a6aaacc6511434f8187663cae7673071
3
+ metadata.gz: 618c6e1f4580e6fe2ffecc0b8c99c9bee40a8800
4
+ data.tar.gz: b7504363b8dc17db4e364eb581c6c5d7ab3614a0
5
5
  SHA512:
6
- metadata.gz: f1e1d69effb6dd0abd4250abb3553ddec30a809f3be8bc925d19ad2a4ea7e0df50bd3773a5ae6595eca072716c93bdad497c3d2e382d9837e520e5e3894d79f1
7
- data.tar.gz: 2aa88f20aac7acf8e7f98bd741f708895186017380217b041b1ae6bbae795779dbeaf2612143146a12f0f679a58678a89658ce174e65b0665de1b9ae96d59a95
6
+ metadata.gz: b01be6cf33f9f2012b822b9518495d70fe86e046c2a16db04b62391bdb99411814c913db2e51751d0cff39ebc078b283db1497ae3ff36d1a22e2e2d8339269d5
7
+ data.tar.gz: 9df8c61dbd7920f1688a96c39d203c9c55947fc363d4c027897d14721f284b29d2deb837d73e0b969b65174640a83c7deca2602a5ed05230397dbfeed5d0a3aa
data/lib/status-plugin.js CHANGED
@@ -1,15 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var webpack = require("webpack");
3
+ function log(type, value) {
4
+ console.log('STATUS:', JSON.stringify({type, value}));
5
+ }
4
6
 
5
7
  function WebpackDriverStatusPlugin(options) {
6
8
  this.options = options;
7
9
  }
8
10
 
9
- function log(type, value) {
10
- console.log('STATUS:', JSON.stringify({type, value}));
11
- }
12
-
13
11
  WebpackDriverStatusPlugin.prototype.apply = function(compiler) {
14
12
  var timer;
15
13
 
@@ -18,14 +16,6 @@ WebpackDriverStatusPlugin.prototype.apply = function(compiler) {
18
16
  log("dev-server", { port, host, outputPath });
19
17
  }
20
18
 
21
- compiler.apply(new webpack.ProgressPlugin(function (percent, msg) {
22
- log("compile", {
23
- "progress": percent,
24
- "operation": msg,
25
- "ms": Date.now() - timer
26
- });
27
- }));
28
-
29
19
  compiler.plugin("compile", function() {
30
20
  timer = Date.now();
31
21
  log("compile", {
@@ -80,7 +70,6 @@ WebpackDriverStatusPlugin.prototype.apply = function(compiler) {
80
70
  });
81
71
  callback();
82
72
  });
83
-
84
73
  }
85
74
 
86
75
  module.exports = WebpackDriverStatusPlugin;
@@ -20,8 +20,6 @@ module WebpackDriver
20
20
 
21
21
  attr_reader :process
22
22
 
23
-
24
-
25
23
  ROOT = Pathname.new(__FILE__).dirname.join('..', '..')
26
24
 
27
25
  def initialize(options = {})
@@ -1,3 +1,3 @@
1
1
  module WebpackDriver
2
- VERSION = "0.3.7"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,10 +1,11 @@
1
1
  var config = require('./webpack.config.js');
2
- var WebpackDriverStatusPlugin = require('<%= options[:config].gem_root %>/lib/status-plugin.js');
2
+ var WebpackStatusPlugin = require('<%= options[:config].gem_root %>/lib/status-plugin.js');
3
+ var webpack = require('webpack');
3
4
 
4
5
  config.plugins = (config.plugins || []);
5
6
 
6
7
  config.plugins.push(
7
- new WebpackDriverStatusPlugin()
8
+ new WebpackStatusPlugin(config)
8
9
  );
9
10
 
10
11
  module.exports = config;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpack_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Stitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-25 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: knitter
@@ -140,7 +140,6 @@ files:
140
140
  - Rakefile
141
141
  - bin/console
142
142
  - bin/setup
143
- - lib/config.rb
144
143
  - lib/status-plugin.js
145
144
  - lib/webpack_driver.rb
146
145
  - lib/webpack_driver/asset.rb
@@ -178,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
177
  version: '0'
179
178
  requirements: []
180
179
  rubyforge_project:
181
- rubygems_version: 2.6.11
180
+ rubygems_version: 2.6.13
182
181
  signing_key:
183
182
  specification_version: 4
184
183
  summary: Run webpack-dev-server in a sub process
data/lib/config.rb DELETED
@@ -1,14 +0,0 @@
1
- module WebpackDriver
2
-
3
- module Config
4
-
5
- class << self
6
-
7
- def generate
8
- puts 'hi'
9
- end
10
- end
11
-
12
- end
13
-
14
- end