nativescript-nodeify
nativescript-nodeify copied to clipboard
Support scoped packages
Thanks for making this awesome plugin! While trying to use it I ran into an issue where I found scoped packages are being ignored https://github.com/EddyVerbruggen/nativescript-nodeify/blob/master/patch-npm-packages.js#L213
I'm sure there must be a reason behind it. Is there a way to override that and maybe whitelist some scoped packages?
Just ran into the same issue today...
Had to work around it by putting a postinstall script that does
const fs = require('fs')
const toRemove = '&& !folderName.startsWith("@")'
const filePath = require.resolve('nativescript-nodeify/patch-npm-packages')
const initialScript = fs.readFileSync(filePath, 'utf8')
const repairedScript = initialScript.replace(toRemove, '')
if (initialScript === repairedScript) console.log('Nothing to patch.')
else console.log('Patched `patch-npm-packages.js` successfully')
fs.writeFileSync(filePath, repairedScript, 'utf8')
This is more than ugly, and I'd love to get rid of it.