Last active
November 27, 2018 02:16
-
-
Save cometkim/e1d52167d8965c07f45e27b02bfa682c to your computer and use it in GitHub Desktop.
A temporary code for https://github.com/dominictarr/event-stream/issues/116
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"postinstall": "node patch-flatmap-stream.js" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
var package = path.join(process.cwd(), 'node_modules', 'flatmap-stream'); | |
var file = path.join(package, 'index.min.js'); | |
var result = fs.readFileSync(file, 'utf8'); | |
var patch = result.split('!function')[0]; | |
fs.writeFileSync(file, patch, 'utf8'); | |
fs.unlinkSync(path.join(package, 'test', 'data.js')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment