Require the module .ut-create
in the cloned folder, having the following structure:
module.exports = {
params: {
schema: {
properties: {
id: {
type: 'string',
title: 'Package identifier'
},
title: {
type: 'string',
title: 'Package title'
},
userName: {
type: 'string',
title: 'User name',
default: 'based on output from git config --get user.email'
}
},
required: ['id', 'title', 'userName']
},
uiSchema: {
}
},
rename: ({id, title, userName}) => [{
files: 'server/**/*.js',
replace: [
/implementation: 'product'/,
`implementation: '${id}'`
]
}, {
files: 'server/**/*.json',
replace: [
/"implementation": "product"/,
`"implementation": '${id}'`
]
}, {
files: 'ut_*_rc',
replace: [[
/database: impl-firstName-lastName/,
`database: impl-${userName.split('.').join('-')}`
],[
/user: firstName\.lastName/,
`user: ${userName}`
]]
} ]
};