UNPKG

react-native-asset

Version:

Linking and unlinking of assets in your react-native app, works for fonts and sounds

29 lines (28 loc) 1.14 kB
"use strict"; /** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createGroupWithMessage; const createGroup_js_1 = __importDefault(require("./createGroup.js")); const getGroup_js_1 = __importDefault(require("./getGroup.js")); /** * Given project and path of the group, it checks if a group exists at that path, * and deeply creates a group for that path if its does not already exist. * * Returns the existing or newly created group */ function createGroupWithMessage(project, path) { let group = (0, getGroup_js_1.default)(project, path); if (!group) { group = (0, createGroup_js_1.default)(project, path); console.warn("ERRGROUP", `Group '${path}' does not exist in your Xcode project. We have created it automatically for you.`); } return group; }