gamebox / gwirl Goto Github PK
View Code? Open in Web Editor NEWA template language for Go, inspired by Scala Play's Twirl.
License: MIT License
A template language for Go, inspired by Scala Play's Twirl.
License: MIT License
Integrate with gopls
and provide semantic highlighting and autocomplete, linting, compiler errors, etc.
Do we want to support multiple content transclusions? Some things like a base layout may want to allow a consumer to transclude HTML for things like head content, body content, and footer content.
Currently only if
is supported, but adding if else
and else
support should be relatively simple. This should be done as soon as possible.
Need some kind of distinctive branding for the language before we create the website.
Kind of a gap from Twirl, implement safe go expression syntax:
THis is a string that I want to appear verbatim, @(someValue.someMethod().value).
Notice that the parens demarcate the boundary of the expression, which is useful for usages where the expression is followed by a valid character in a Go expression.
Create a lightweight Static Site generation tool on top of Gwirl and use it to publish a GitHub pages site for Gwirl.
Or create a function that takes an empty interface and then use reflect to do the "right thing" with it.
At first support
Eventually we will support
We would like to have it so that @}
(and new to the language @{
) are needed solely for escaping unbalanced squirly braces. Balanced braces can be written as Whatever Supreme Power You Believe In intended.
This is the highest priority thing to do, as it is likely considered a bug that this does not happen today. We can probably start with using something like
sb.WriteString(html.HTMLEscapeString(fmt.Sprintf("%v", /* expression */)))
And then refine from there, we'd probably want to extract that to a GwirlEscaped function in the package along with GwirlRaw
Right now all templates need to be written at the top level of the templates
directory, as we don't traverse any subdirectories.
Should Gwirl support writing your Gwirl files in any directory, and have the _gwirl.go
files be output in that same package?
Pros
Cons
.gwirl
filesA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.