Skip to content
New issue

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

Does Not Rename files inside sub-directories #14

Open
orizens opened this issue Feb 5, 2021 · 5 comments
Open

Does Not Rename files inside sub-directories #14

orizens opened this issue Feb 5, 2021 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@orizens
Copy link

orizens commented Feb 5, 2021

hi.
Thanks for this extension.

i'm using Template v1.1.5 code to rename files, but files are not renamed:

replaceFileNameFn: (fileName, templateName, utils) => {
    const { path } = utils;
    // @see https://nodejs.org/api/path.html#path_path_parse_path
    const { base } = path.parse(fileName);
    // You can change the file name
    return base.replace(/__templateName__/gm, templateName);
  },

i have tried it with the template-sample - i created this file __templateName__.jsx.
after create template with rename - the file is not renamed.

any suggestions?

@orizens
Copy link
Author

orizens commented Feb 5, 2021

noticed vscode required an updated and issue resolved.

@orizens orizens closed this as completed Feb 5, 2021
@orizens orizens reopened this Feb 5, 2021
@orizens
Copy link
Author

orizens commented Feb 5, 2021

just noticed file rename doesn't work with sub-directories.
however, files content is renamed.

@orizens orizens changed the title Rename files from templated names is not working Does Not Rename files inside sub-directories Feb 5, 2021
@stegano stegano added good first issue Good for newcomers enhancement New feature or request labels Feb 6, 2021
@stegano
Copy link
Owner

stegano commented Feb 6, 2021

Hi @orizens, Thanks for reporting
Unfortunately, This extension is not supported rename sub-directory now.
But I will consider the feature that rename the subdirectory. It looks to be a pretty good feature.
Thank you 😁

@stegano stegano added this to the v1.2.0 milestone Feb 6, 2021
stegano added a commit that referenced this issue Feb 6, 2021
stegano added a commit that referenced this issue Feb 6, 2021
@stegano
Copy link
Owner

stegano commented Feb 6, 2021

Hi @orizens
I just fixed it and released v1.2.1
You can rename sub directories feature now,

If you want to use this feature, you have to update the extension and add settings.
Please refer to the link(or remove template.config.js and trigger Create template, a new version template.config.js will be created)

Thanks 😀

@orizens
Copy link
Author

orizens commented Feb 7, 2021

Thanks so much @stegano
I'll check it out during this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants