提交 db13503d 编写于 作者: sq3536's avatar sq3536

判断表达式 handlebars 写法

上级 4f819f5b
...@@ -46,7 +46,7 @@ public class CliOption extends DataObj ...@@ -46,7 +46,7 @@ public class CliOption extends DataObj
this.set(templateFileType.name(),baseData); this.set(templateFileType.name(),baseData);
this.set(templateFileType.value(),path); this.set(templateFileType.value(),path);
if(!StringUtils.isEmpty(this.cliSubType)) if(!StringUtils.isEmpty(this.cliSubType))
this.set(templateFileType.value()+"__"+this.cliSubType,path); this.set(templateFileType.value()+"@"+this.cliSubType,path);
return this; return this;
} }
...@@ -104,4 +104,8 @@ public class CliOption extends DataObj ...@@ -104,4 +104,8 @@ public class CliOption extends DataObj
} }
@Override
public int size() {
return super.size();
}
} }
...@@ -55,7 +55,7 @@ public class TemplateDefinition { ...@@ -55,7 +55,7 @@ public class TemplateDefinition {
Pattern p = Pattern.compile("\\{\\{([^}]*)\\}\\}"); Pattern p = Pattern.compile("\\{\\{([^}]*)\\}\\}");
Matcher m = p.matcher(fileName); Matcher m = p.matcher(fileName);
while (m.find()) { while (m.find()) {
String[] pairs=m.group(1).split("__"); String[] pairs=m.group(1).split("@");
if(type.name().equalsIgnoreCase(pairs[0]) if(type.name().equalsIgnoreCase(pairs[0])
||type.value().equalsIgnoreCase(pairs[0])) { ||type.value().equalsIgnoreCase(pairs[0])) {
if(pairs.length>1&&(!StringUtils.isEmpty(pairs[1]))) if(pairs.length>1&&(!StringUtils.isEmpty(pairs[1])))
......
预定义代码片段模板目录
其余模板文件引用时可以使用 {{>././.def/pub.txt}} 方式引用,支持相对路径
\ No newline at end of file
**.ibizlab-generator-ignore **.ibizlab-generator-ignore
**.DS_Store **.DS_Store
**.def/** **@macro/**
\ No newline at end of file \ No newline at end of file
预定义代码片段模板目录
其余模板文件引用时可以使用 {{> @macro/pub.txt}} 方式引用,支持相对路径
\ No newline at end of file
子模板 {{projectName}}
123
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{{/eq}} {{/eq}}
目前支持的判断有 eq 等于, neq 不等于, gt 大于, gte 大于等于, lt 小于 , lte 小于等于
{{#appEntity.ctrls}} {{#appEntity.ctrls}}
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<artifactId>{{projectName}}-dependencies</artifactId> <artifactId>{{projectName}}-dependencies</artifactId>
<version>1.0.0.0</version> <version>1.0.0.0</version>
<relativePath>{{projectName}}-dependencies/pom.xml</relativePath> <relativePath>{{projectName}}-dependencies/pom.xml</relativePath>
</parent> </parent>
<modules> <modules>
<!-- dependencies --> <!-- dependencies -->
<module>{{projectName}}-dependencies</module> <module>{{projectName}}-dependencies</module>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册