diff --git a/src/lift.js b/src/lift.js index 5e3af058..f1ca5cab 100644 --- a/src/lift.js +++ b/src/lift.js @@ -2,8 +2,14 @@ import deepmerge from 'deepmerge'; import {applyEnhancers} from '@form8ion/core'; import {lift as liftReadme} from '@form8ion/readme'; +import {test as gitIgnoreExists, lift as liftGitignore} from './vcs/git/ignore/index.js'; + export default async function ({projectRoot, results, enhancers, vcs}) { - const enhancerResults = await applyEnhancers({results, enhancers, options: {projectRoot, vcs}}); + const enhancerResults = await applyEnhancers({ + results, + enhancers: {...enhancers, gitIgnore: {test: gitIgnoreExists, lift: liftGitignore}}, + options: {projectRoot, vcs} + }); await liftReadme({projectRoot, results: deepmerge.all([results, enhancerResults])}); diff --git a/src/lift.test.js b/src/lift.test.js index ea7b8277..23a950a6 100644 --- a/src/lift.test.js +++ b/src/lift.test.js @@ -6,6 +6,7 @@ import {afterEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; +import {lift as liftGitignore, test as gitIgnoreExists} from './vcs/git/ignore/index.js'; import lift from './lift.js'; vi.mock('deepmerge'); @@ -25,7 +26,11 @@ describe('lift', () => { const enhancerResults = any.simpleObject(); const mergedResults = any.simpleObject(); when(core.applyEnhancers) - .calledWith({results, enhancers, options: {projectRoot, vcs}}) + .calledWith({ + results, + enhancers: {...enhancers, gitIgnore: {test: gitIgnoreExists, lift: liftGitignore}}, + options: {projectRoot, vcs} + }) .mockResolvedValue(enhancerResults); when(deepmerge.all).calledWith([results, enhancerResults]).mockReturnValue(mergedResults);