From 5b4adb4a29a1a5fc1d7dc1d3208fcf004d482249 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Wed, 27 Mar 2024 12:20:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8ae8fe..cc33db5 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,9 @@ This package is used for code generation of C# meta structs using Twig templates Usage example: - $twig = \metagen_cs\get_twig(); - file_put_contents('bundle.cs', - $twig->render("codegen_bundle.twig", - [ - 'namespace' => 'BitGames.Autogen', - 'meta' => get_meta() - ] - ) - ); + $code = \metagen_cs\codegen(null, get_meta(), + [ + 'namespace' => 'BitGames.Autogen' + ]); + file_put_contents('bundle.cs', $code); +