vscode-template
vscode-template copied to clipboard
Does Not Rename files inside sub-directories
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?
noticed vscode required an updated and issue resolved.
just noticed file rename doesn't work with sub-directories.
however, files content is renamed.
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 😁
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)
- https://github.com/stegano/vscode-template/blob/master/assets/template.config.js#L29L33
Thanks 😀
Thanks so much @stegano I'll check it out during this week!