mirror of
https://github.com/discordjs/discord.js.git
synced 2024-07-08 01:41:18 +12: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:
parent
b0e57126dc
commit
9c8784fe51
|
@ -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);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# Packages node_modules # Log files logs *.log npm-debug.log* # Runtime data pids *.pid *.seed # Env .env # Dist dist
|
||||
dist-docs # Docs docs/**/* !docs/README.md # Miscellaneous .turbo .tmp coverage
|
||||
dist-docs # Docs docs/**/* !docs/README.md # Miscellaneous .turbo .tmp coverage
|
Loading…
Reference in a new issue