We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm clone this repo and I make an implementation for write output.path not only as string but also as function that return a string.
Reason:
So path, instead of be a simple string, will be a function that check input data and generate different output paths.
This is my working configuration:
const items = [ { option: 'Vue File', defaultCase: '(pascalCase)', entry: { folderPath: './tools/templates/vue/__file__.vue', }, stringReplacers: ['__type__', '__file__'], output: { path: (replacers, configItem) => { function search(key, replacers){ let i = 0 let l = replacers.length for (i; i < l; i++) { if (replacers[i].slot === key) { return replacers[i]; } } } const type = search('__type__(kebabCase)', replacers) if (type.slotValue === 'page') { return `./src/pages/__file__.vue` } else if (['atom', 'component', 'organism'].includes(type.slotValue)) { return `./src/components/__type__(kebabCase)s/__file__.vue` } throw new Error('Type specified is not valid.') }, pathAndFileNameDefaultCase: '(pascalCase)', }, }, ]
If possibile, I want to create a pull request for this new feature.
The text was updated successfully, but these errors were encountered:
sure you can create a pr
Sorry, something went wrong.
No branches or pull requests
Hi, I'm clone this repo and I make an implementation for write output.path not only as string but also as function that return a string.
Reason:
So path, instead of be a simple string, will be a function that check input data and generate different output paths.
This is my working configuration:
If possibile, I want to create a pull request for this new feature.
The text was updated successfully, but these errors were encountered: