UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

14 lines (13 loc) 963 B
import { createNeedleCallback } from '../../base/support/needles.js'; const changelogType = { base: 'liquibase-add-changelog', incremental: 'liquibase-add-incremental-changelog', constraints: 'liquibase-add-constraints-changelog', }; const addLiquibaseChangelogToMasterCallback = ({ changelogName, needle }) => createNeedleCallback({ needle, contentToAdd: `<include file="config/liquibase/changelog/${changelogName}.xml" relativeToChangelogFile="false"/>`, }); export const addLiquibaseChangelogCallback = ({ changelogName, section = 'base' }) => addLiquibaseChangelogToMasterCallback({ needle: changelogType[section], changelogName }); export const addLiquibaseIncrementalChangelogCallback = ({ changelogName }) => addLiquibaseChangelogCallback({ changelogName, section: 'incremental' }); export const addLiquibaseConstraintsChangelogCallback = ({ changelogName }) => addLiquibaseChangelogCallback({ changelogName, section: 'constraints' });