INNER CODE UNIT · JavaScript
removeLibraryNpmIgnorePaths
mmazzarolo/react-native-modal-datetime-picker · scripts/examples_postinstall.js:66
const removeLibraryNpmIgnorePaths = (npmIgnorePath, libraryNodeModulesPath) => {
if (!fs.existsSync(npmIgnorePath)) {
console.log(
`No .npmignore found at ${npmIgnorePath}. Skipping deleting content.`
);
return;
}
fs.readFileSync(npmIgnorePath, "utf8")
.split(/\r?\n/)
.forEach((entry) => {
if (entry.length === 0) {
return;
}
const npmIgnoreLibraryNodeModulesEntryPath = path.resolve(
libraryNodeModulesPath,
entry