UNPKG

@nx/vite

Version:

The Nx Plugin for building and testing applications using Vite

23 lines (22 loc) 976 B
"use strict"; Object.defineProperty(exports, "default", { enumerable: true, get: function() { return addViteTempFilesToGitIgnore; } }); const _ignorevitetempfiles = require("../../utils/ignore-vite-temp-files"); function addViteTempFilesToGitIgnore(tree) { // need to check if .gitignore exists before adding to it // then need to check if it contains the following pattern // **/vite.config.{js,ts,mjs,mts,cjs,cts}.timestamp* // if it does, remove just this pattern if (tree.exists('.gitignore')) { const gitIgnoreContents = tree.read('.gitignore', 'utf-8'); if (gitIgnoreContents.includes('**/vitest.config.{js,ts,mjs,mts,cjs,cts}.timestamp*')) { tree.write('.gitignore', gitIgnoreContents.replace('**/vitest.config.{js,ts,mjs,mts,cjs,cts}.timestamp*', '')); } } (0, _ignorevitetempfiles.addViteTempFilesToGitIgnore)(tree); } //# sourceMappingURL=add-vitest-temp-files-to-git-ignore.js.map