Skip to content

Commit

Permalink
spdy-transport-quickfix, #6
Browse files Browse the repository at this point in the history
  • Loading branch information
pcnate committed Nov 4, 2018
1 parent 26059de commit 1d87e74
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions conf/spdy-transport-quickfix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
let fs = require('fs')
let path = require('path')
let file = path.join(
process.cwd(),
'node_modules/spdy-transport/lib/spdy-transport/priority.js'
)

let data = fs
.readFileSync(file)
.toString()
.split('\n')
if (data.length < 190) {
data.splice(73, 0, '/*')
data.splice(75, 0, '*/')
data.splice(
187,
0,
`
var index = utils.binarySearch(this.list, node, compareChildren);
this.list.splice(index, 1);
`
)
let text = data.join('\n')

fs.writeFile(file, text, function(err) {
if (err) return console.log(err)
})
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"postinstall": "node ./conf/spdy-transport-quickfix.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 1d87e74

Please sign in to comment.