UNPKG

@nx/storybook

Version:

The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.

16 lines (15 loc) 489 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateGitignore = updateGitignore; function updateGitignore(tree) { if (!tree.exists('.gitignore')) { return; } const gitignore = tree.read('.gitignore', 'utf-8'); const regex = /storybook-static/gm; const hasStorybookStatic = regex.test(gitignore ?? ''); if (hasStorybookStatic) { return; } tree.write('.gitignore', `${gitignore}\n\nstorybook-static`); }