Skip to content

Commit

Permalink
Use warning mixin in Pack class
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed May 12, 2017
1 parent c0adbc0 commit f92d9f9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ const ONDRAIN = Symbol('ondrain')

const fs = require('fs')
const path = require('path')
const warner = require('./warn-mixin.js')

class Pack extends MiniPass {
const Pack = warner(class Pack extends MiniPass {
constructor (opt) {
super(opt)
opt = opt || Object.create(null)
Expand Down Expand Up @@ -240,10 +241,6 @@ class Pack extends MiniPass {
this[PIPE](job)
}

warn (msg, data) {
return this.emit('warn', msg, data)
}

[ENTRY] (job) {
this[JOBS] += 1
try {
Expand Down Expand Up @@ -303,7 +300,7 @@ class Pack extends MiniPass {
this.zip.pause()
return super.pause()
}
}
})

class PackSync extends Pack {
constructor (opt) {
Expand Down

0 comments on commit f92d9f9

Please sign in to comment.