2 Star 0 Fork 0

李磊/xjtable

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
template.config.js 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
李磊 提交于 2024-09-14 16:22 . 初始化
/**
* This file is a configuration file generated by the `Template` extension on `vscode`
* @see https://marketplace.visualstudio.com/items?itemName=yongwoo.template
*/
module.exports = {
// You can change the template path to another path
templateRootPath: "./.templates",
// After copying the template file the `replaceFileTextFn` function is executed
replaceFileTextFn: (fileText, templateName, utils) => {
// @see https://www.npmjs.com/package/change-case
const { changeCase } = utils;
// You can change the text in the file
return fileText
.replace(/__templateName__/g, templateName)
.replace(
/__templateNameToPascalCase__/g,
changeCase.pascalCase(templateName)
)
.replace(
/__templateNameToParamCase__/g,
changeCase.paramCase(templateName)
);
},
renameFileFn: (fileName, templateName, utils) => {
const { path } = utils;
const { base } = path.parse(fileName);
return base.replace(/__templateName__/gm, templateName);
},
renameSubDirectoriesFn: (directoryName, templateName, _utils) => {
const { changeCase } = _utils;
const newDirectoryName = changeCase.paramCase(templateName);
return directoryName.replace(/__templateName__/g, newDirectoryName);
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li-lei22/xjtable.git
git@gitee.com:li-lei22/xjtable.git
li-lei22
xjtable
xjtable
master

搜索帮助