Closed troym9731 closed 7 years ago
Thanks @troym9731 !
Could you give me more information about the bug? What happens? How can I reproduce it?
I believe it is the bug that is fixed by this pull request: https://github.com/CVarisco/create-component-app/pull/28. The problem I'm running into is that when I install the latest version of create-component-app
from npm, it doesn't include this code change.
Here is the code in master:
function generateFileName(newFilePath, newFileName, templateFileName) {
// Suppose that the index file don't be renamed
if (templateFileName.indexOf('index') !== -1) {
return templateFileName
}
if (fs.existsSync(newFilePath)) {
return templateFileName
}
if (templateFileName.includes('COMPONENT_NAME')) {
return templateFileName.replace(/COMPONENT_NAME/g, newFileName)
}
return `${newFileName}.${getExtension(templateFileName)}`
}
Code from v0.8.5 on npm:
function generateFileName(newFilePath, newFileName, fileName) {
// Suppose that the index file don't be renamed
if (fileName.indexOf('index') !== -1) {
return fileName;
}
if (_fsExtra2.default.existsSync(newFilePath)) {
return fileName;
}
if (fileName.includes('COMPONENT_NAME')) {
return fileName.replace(/COMPONENT_NAME/g, newFileName);
}
return newFileName;
}
This is what I meant by if you're already aware that this change hasn't been released, and you'll be releasing this at a later date, then feel free to ignore the issue! 😄 I just thought I'd create this in case it somehow was meant to be released and got missed
Perfect ! I've published a new version 0.8.6 with this fix. I think that I did a mistake on the build-publish process before.
Thanks a lot for your support 🙂 Could you check if everything works well?
ps: Feel free to close the issue if it works 🌮
Everything looks great! Thanks for the help! 👍
This is a really great tool that you've built! I'm hoping to start using this with the team I work with. It appears that your latest bug fix from a couple weeks ago dealing with duplicate extensions for custom templates isn't in the latest release available on npm?
If you're already aware of this, then I apologize in advance for opening this issue! And thank you for contributing your time to making this 👍