UNPKG

@nx/nuxt

Version:

The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Vitest, Playwright, Cypress, and Storybook. - Generators for applications, l

23 lines (22 loc) 651 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateGitIgnore = updateGitIgnore; function updateGitIgnore(tree) { const contents = tree.read('.gitignore', 'utf-8') ?? ''; const nuxtEntries = [ '# Nuxt dev/build outputs', '.output', '.data', '.nuxt', '.nitro', '.cache', ]; let newContents = contents; for (const entry of nuxtEntries) { const regex = new RegExp(`^${entry}$`, 'm'); if (!regex.test(newContents)) { newContents += `\n${entry}`; } } tree.write('.gitignore', [newContents].join('\n')); }