UNPKG

@nx/expo

Version:

The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.

17 lines (16 loc) 633 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addGitIgnoreEntry = addGitIgnoreEntry; const devkit_1 = require("@nx/devkit"); const gitignore_entries_1 = require("./gitignore-entries"); function addGitIgnoreEntry(host) { if (!host.exists('.gitignore')) { devkit_1.logger.warn(`Couldn't find .gitignore file to update`); return; } let content = host.read('.gitignore')?.toString('utf-8').trimEnd(); if (!/\.expo\/$/gm.test(content)) { content = `${content}\n${gitignore_entries_1.gitIgnoreEntriesForExpo}\n`; } host.write('.gitignore', content); }