GithubHelp home page GithubHelp logo

nanotemplate's Introduction

nonatemplate

nonatemplate is just a extremely simple template implemetation of Java.

documents: https://github.com/oldratlee/nanotemplate/wiki

Why use nonatemplate

The usage of Generating complex String via StringBuilder/StringBuffer is common, but the code is unreadable and buggy.

Obviousely template technique is fit to resolve this problem.

General template implemetation is too big and overkilled in this case, so we need a simple template.

nonatemplate is just a extremely simple template implemetation.

nanotemplate's People

Contributors

oldratlee avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nanotemplate's Issues

模板输出支持方便的对齐

  • 独立一行的指令,这一行不输出中有,即这一行的空白不输出
  • 嵌在行中的指令,指令没有输出内容,行中其它内容(含空白输出)

例子

模板:

<!-- #foreach idx in 1..3 -->
    number: ${idx}
<!-- #end -->

    <!-- #if true -->
line1
    <!-- #end -->

line2 <!--#if true --> 222
    <!-- #end --> 333

输出:

    number: 1
    number: 2
    number: 3

line1

line2  222
     333

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.