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

支持help

java -jar ibizlab-generator-cli.jar help
java -jar ibizlab-generator-cli.jar help generate
上级 c0a4f58e
...@@ -166,15 +166,19 @@ public class CodegenConfig { ...@@ -166,15 +166,19 @@ public class CodegenConfig {
if(templateProcessor==null) if(templateProcessor==null)
{ {
List<TemplatePathLocator> list=new ArrayList<>(); List<TemplatePathLocator> list=new ArrayList<>();
this.getTemplateDirs().forEach(templateDir->{ if( this.getTemplateDirs()!=null)
list.add(new GeneratorTemplateContentLocator(templateDir)); {
}); this.getTemplateDirs().forEach(templateDir->{
list.add(new CommonTemplateContentLocator()); list.add(new GeneratorTemplateContentLocator(templateDir));
this.templateProcessor = new TemplateManager( });
new TemplateManagerOptions(this.isEnableMinimalUpdate(),this.isSkipOverwrite()), list.add(new CommonTemplateContentLocator());
templatingEngine, this.templateProcessor = new TemplateManager(
list new TemplateManagerOptions(this.isEnableMinimalUpdate(),this.isSkipOverwrite()),
); templatingEngine,
list
);
}
} }
return templateProcessor; return templateProcessor;
} }
......
...@@ -46,7 +46,8 @@ public class DefaultGenerator implements Generator { ...@@ -46,7 +46,8 @@ public class DefaultGenerator implements Generator {
List<String> ignorePaths=new ArrayList<>(); List<String> ignorePaths=new ArrayList<>();
ignorePaths.add(ignoreFileLocation); ignorePaths.add(ignoreFileLocation);
ignorePaths.add(this.config.getOutputDir()); ignorePaths.add(this.config.getOutputDir());
ignorePaths.addAll(this.config.getTemplateDirs()); if(this.config.getTemplateDirs()!=null)
ignorePaths.addAll(this.config.getTemplateDirs());
this.ignoreProcessor=CodegenIgnoreProcessor.getInstance(ignorePaths); this.ignoreProcessor=CodegenIgnoreProcessor.getInstance(ignorePaths);
return this; return this;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册