mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: package gen script (#10352)
* fix: package gen script * fix: files without extensions didn't have handlebars stripped * chore: requested change
This commit is contained in:
@@ -41,14 +41,15 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
|
||||
{
|
||||
type: 'addMany',
|
||||
destination: `${plop.getDestBasePath()}/../{{name}}`,
|
||||
templateFiles: ['templates/**'],
|
||||
// plop doesn't like our cliff.toml file since it tries to parse it. we add it manually later
|
||||
templateFiles: ['templates/**', '!templates/default/cliff.toml'],
|
||||
globOptions: { dot: true },
|
||||
base: 'templates/default/',
|
||||
stripExtensions: ['hbs'],
|
||||
},
|
||||
{
|
||||
type: 'modify',
|
||||
path: `${plop.getDestBasePath()}/turbo/generators/templates/cliff.toml`,
|
||||
path: `${plop.getDestBasePath()}/turbo/generators/templates/default/cliff.toml`,
|
||||
async transform(content, answers) {
|
||||
const cliffTOML = content.replace('{{name}}', answers.name);
|
||||
await writeFile(`${plop.getDestBasePath()}/../${answers.name}/cliff.toml`, cliffTOML);
|
||||
|
||||
Reference in New Issue
Block a user