react-native/local-cli/link/windows/isInstalled.js

9 lines
279 B
JavaScript

const fs = require('fs');
const makeUsingPatch = require('./patches/makeUsingPatch');
module.exports = function isInstalled(config, dependencyConfig) {
return fs
.readFileSync(config.mainPage)
.indexOf(makeUsingPatch(dependencyConfig.packageUsingPath).patch) > -1;
};