webpack_driver 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 618c6e1f4580e6fe2ffecc0b8c99c9bee40a8800
4
- data.tar.gz: b7504363b8dc17db4e364eb581c6c5d7ab3614a0
3
+ metadata.gz: bc4b92acc7be1f38995b08394934be430a1b6081
4
+ data.tar.gz: 735dd2b2876cf9a0be6bba74dcc32019264835b4
5
5
  SHA512:
6
- metadata.gz: b01be6cf33f9f2012b822b9518495d70fe86e046c2a16db04b62391bdb99411814c913db2e51751d0cff39ebc078b283db1497ae3ff36d1a22e2e2d8339269d5
7
- data.tar.gz: 9df8c61dbd7920f1688a96c39d203c9c55947fc363d4c027897d14721f284b29d2deb837d73e0b969b65174640a83c7deca2602a5ed05230397dbfeed5d0a3aa
6
+ metadata.gz: 67b6cb8a7857f8f5673d818e8d8e92b59a177b93bdb003fc4d2076bd2d4902a9be9536a83d51a7323ddca5fee3cc82fc86f52b79dce05005ed1e0fce05f1c404
7
+ data.tar.gz: 90900e0b14ce10776f0655b6b9eed3f609715b1ba0e81cafc36e91433829864f825c371847b52e4c73a7c874e1be60d8097a16ed73653b347f2fba37cd2739dd
@@ -17,11 +17,7 @@ WebpackDriverStatusPlugin.prototype.apply = function(compiler) {
17
17
  }
18
18
 
19
19
  compiler.plugin("compile", function() {
20
- timer = Date.now();
21
- log("compile", {
22
- "progress": 0,
23
- "operation": "idle"
24
- })
20
+ log("status", "compiling");
25
21
  });
26
22
 
27
23
  compiler.plugin("invalid", function() {
@@ -11,14 +11,14 @@ module WebpackDriver
11
11
  end
12
12
 
13
13
  def valid?
14
- !alive? && complete? && last_status == 'success'
14
+ !alive? && complete?
15
15
  end
16
16
 
17
17
  def complete?
18
- progress == 1
18
+ last_status == 'success'
19
19
  end
20
20
 
21
- def record_progress(progress, msg)
21
+ def record_status(status)
22
22
  super
23
23
  write_manifest if complete?
24
24
  end
@@ -12,7 +12,7 @@ module WebpackDriver
12
12
 
13
13
  def_delegators :@proc, :alive?, :environment, :wait
14
14
 
15
- attr_reader :config, :assets, :messages, :progress, :error,
15
+ attr_reader :config, :assets, :messages, :error,
16
16
  :last_compilation_message, :last_status
17
17
 
18
18
  def initialize(script, config)
@@ -37,7 +37,6 @@ module WebpackDriver
37
37
  @proc.io.stdout = @proc.io.stderr = w
38
38
  @proc.start
39
39
  w.close
40
- @progress = 0.0
41
40
  @listener = listen_for_status_updates
42
41
  end
43
42
 
@@ -48,7 +47,7 @@ module WebpackDriver
48
47
  end
49
48
 
50
49
  def in_progress?
51
- !! ( !@error && @progress && @progress != 1 )
50
+ @last_status == 'compiling'
52
51
  end
53
52
 
54
53
  protected
@@ -66,9 +65,8 @@ module WebpackDriver
66
65
  )
67
66
  end
68
67
 
69
- def record_progress(progress, msg)
70
- @progress = progress
71
- @last_compilation_message = msg['value']
68
+ def record_status(status)
69
+ @last_status = status
72
70
  end
73
71
 
74
72
  def record_message(msg)
@@ -78,11 +76,9 @@ module WebpackDriver
78
76
  end
79
77
  case msg['type']
80
78
  when 'status'
81
- @last_status = msg['value']
79
+ record_status(msg['value'])
82
80
  when 'asset'
83
81
  Asset.record(@assets, msg['value'])
84
- when 'compile'
85
- record_progress msg['value']['progress'], msg
86
82
  when 'error'
87
83
  record_error(msg['value'])
88
84
  when 'config'
@@ -1,3 +1,3 @@
1
1
  module WebpackDriver
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpack_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Stitt