webpack_driver 0.4.0 → 0.4.1
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 +4 -4
 - data/lib/status-plugin.js +1 -5
 - data/lib/webpack_driver/compile.rb +3 -3
 - data/lib/webpack_driver/process.rb +5 -9
 - data/lib/webpack_driver/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: bc4b92acc7be1f38995b08394934be430a1b6081
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 735dd2b2876cf9a0be6bba74dcc32019264835b4
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 67b6cb8a7857f8f5673d818e8d8e92b59a177b93bdb003fc4d2076bd2d4902a9be9536a83d51a7323ddca5fee3cc82fc86f52b79dce05005ed1e0fce05f1c404
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 90900e0b14ce10776f0655b6b9eed3f609715b1ba0e81cafc36e91433829864f825c371847b52e4c73a7c874e1be60d8097a16ed73653b347f2fba37cd2739dd
         
     | 
    
        data/lib/status-plugin.js
    CHANGED
    
    | 
         @@ -17,11 +17,7 @@ WebpackDriverStatusPlugin.prototype.apply = function(compiler) { 
     | 
|
| 
       17 
17 
     | 
    
         
             
                }
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                compiler.plugin("compile", function() {
         
     | 
| 
       20 
     | 
    
         
            -
                     
     | 
| 
       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? 
     | 
| 
      
 14 
     | 
    
         
            +
                        !alive? && complete?
         
     | 
| 
       15 
15 
     | 
    
         
             
                    end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                    def complete?
         
     | 
| 
       18 
     | 
    
         
            -
                         
     | 
| 
      
 18 
     | 
    
         
            +
                        last_status == 'success'
         
     | 
| 
       19 
19 
     | 
    
         
             
                    end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
                    def  
     | 
| 
      
 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, : 
     | 
| 
      
 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 
     | 
    
         
            -
                         
     | 
| 
      
 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  
     | 
| 
       70 
     | 
    
         
            -
                        @ 
     | 
| 
       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 
     | 
    
         
            -
                             
     | 
| 
      
 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'
         
     |