mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
d2c569795c
Summary: No code changes, no testing required. alligned -> aligned allignment -> alignment completly -> completely conseptually -> conceptually decendents -> descendants indefinetly -> indefinitely dimention -> dimension doesnt -> doesn't safegaurd -> safeguard intialization -> initialization hierachy -> hierarchy happend -> happened gaurd -> guard programatically -> programmatically initalized -> initialized immidiately -> immediately occured -> occurred unkown -> unknown neccessary -> necessary neccesarily -> necessarily occuring -> occurring comoponent -> component propogate -> propagate recieved -> received referece -> reference perfomance -> performance recieving -> receiving subsquently -> subsequently scoll -> scroll suprisingly -> surprisingly targetting -> targeting tranform -> transform symetrical -> symmetrical wtih -> with Closes https://github.com/facebook/react-native/pull/17578 Differential Revision: D6718791 Pulled By: shergin fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
28 lines
674 B
JavaScript
28 lines
674 B
JavaScript
const getGroup = require('./getGroup');
|
|
|
|
const hasGroup = (pbxGroup, name) => pbxGroup.children.find(group => group.comment === name);
|
|
|
|
/**
|
|
* Given project and path of the group, it deeply creates a given group
|
|
* making all outer groups if necessary
|
|
*
|
|
* Returns newly created group
|
|
*/
|
|
module.exports = function createGroup(project, path) {
|
|
return path.split('/').reduce(
|
|
(group, name) => {
|
|
if (!hasGroup(group, name)) {
|
|
const uuid = project.pbxCreateGroup(name, '""');
|
|
|
|
group.children.push({
|
|
value: uuid,
|
|
comment: name,
|
|
});
|
|
}
|
|
|
|
return project.pbxGroupByName(name);
|
|
},
|
|
getGroup(project)
|
|
);
|
|
};
|