GT2/GT2-iOS/node_modules/react-native/local-cli/link/windows/patches/makeProjectPatch.js

15 lines
565 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
module.exports = function makeProjectPatch(windowsConfig) {
const projectInsert = `<ProjectReference Include="..\\${windowsConfig.relativeProjPath}">
<Project>{${windowsConfig.pathGUID}}</Project>
<Name>${windowsConfig.projectName}</Name>
</ProjectReference>
`;
return {
pattern: '<ProjectReference Include="..\\..\\node_modules\\react-native-windows\\ReactWindows\\ReactNative\\ReactNative.csproj">',
patch: projectInsert,
unpatch: new RegExp(`<ProjectReference.+\\s+.+\\s+.+${windowsConfig.projectName}.+\\s+.+\\s`),
};
};