新增jnt模板引擎

This commit is contained in:
不做码农
2021-11-29 21:54:01 +08:00
parent 7eadff782e
commit 6772266b95
7 changed files with 95 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
using System;
using JinianNet.JNTemplate;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
@@ -108,6 +109,16 @@ namespace ZR.CodeGenerator
return str;
}
public static ITemplate ReadJtTemplate(string tplName)
{
string path = Environment.CurrentDirectory;
string fullName = Path.Combine(path, "wwwroot", "CodeGenTemplate", tplName);
if (File.Exists(fullName))
{
return Engine.LoadTemplate(fullName);
}
return null;
}
/// <summary>
/// 压缩代码