INNER CODE UNIT · JavaScript
removeLibraryNodeModulesPath
mmazzarolo/react-native-modal-datetime-picker · scripts/examples_postinstall.js:49
const removeLibraryNodeModulesPath = (nodeModulesPath) => {
if (!fs.existsSync(nodeModulesPath)) {
console.log(
`No node_modules found at ${nodeModulesPath}. Skipping delete.`
);
return;
}
try {
removeFileDirectoryRecursively(nodeModulesPath);
console.log(`Successfully deleted: ${nodeModulesPath}`);
} catch (err) {
console.log(`Error deleting ${nodeModulesPath}: ${err.message}`);
}
};
/// Remove all entries from the .npmignore within example/node_modules/react-native-library-name/
const removeLibraryNpmIgnorePaths = (npmIgnorePath, libraryNodeModulesPath) => {