Function gitIgnore

  • Adds an entry to the project's .gitignore file. Will create a .gitignore file if it doesn't exist. Will insert the pattern under the heading and create the heading if it doesn't exist.

    Parameters

    • pattern: string

      the pattern to add to the .gitignore file

    • Optional heading: string

      optional heading to place the pattern under

    Returns Promise<void>

    Example

    place an ignore entry at the bottom of the file

    import { project } from 'ember-apply';

    await project.gitIgnore('node_modules');

    Example

    place an ignore under a heading in the .gitignore file

    import { project } from 'ember-apply';

    await project.gitIgnore('dist', '# build output');

Generated using TypeDoc