/// <summary> /// sourcePath: Directory, targetPath: File /// </summary> /// <param name="sourcePath"></param> /// <param name="targetPath"></param> public static void CompileTo(string sourcePath, string targetPath) { var compiler = new XYCompiler(sourcePath); var output = compiler.Output(); if (!Directory.Exists(targetPath)) { Directory.CreateDirectory(Path.GetDirectoryName(targetPath)); } File.WriteAllText(targetPath, output, Encoding.UTF8); }
public static string Compile(string sourcePath) { var compiler = new XYCompiler(sourcePath); return(compiler.Output(true)); }