Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/squarespace/template-compiler
Java compiler for primary Squarespace template language
https://github.com/squarespace/template-compiler
Last synced: about 1 month ago
JSON representation
Java compiler for primary Squarespace template language
- Host: GitHub
- URL: https://github.com/squarespace/template-compiler
- Owner: Squarespace
- License: apache-2.0
- Created: 2015-05-20T14:24:32.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T17:39:46.000Z (3 months ago)
- Last Synced: 2024-12-09T11:38:09.939Z (about 2 months ago)
- Language: Java
- Homepage: https://www.javadoc.io/doc/com.squarespace.template/template-core/
- Size: 2.76 MB
- Stars: 41
- Watchers: 16
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Squarespace Template Compiler.
A Java template compiler based on [JSON-Template][jsont].
[![Build Status](https://travis-ci.org/Squarespace/template-compiler.svg?branch=master)](https://travis-ci.org/Squarespace/template-compiler)
[![Coverage Status](https://coveralls.io/repos/github/Squarespace/template-compiler/badge.svg?branch=master)](https://coveralls.io/github/Squarespace/template-compiler?branch=master)License: [Apache 2.0](LICENSE) ([summary][license-tldr])
Copyright (c) 2014 SQUARESPACE, Inc.
## Overview
Squarespace's template language is based on JSON-Template, a minimal
declarative template language for Python and JavaScript, heavily influenced by
[google-ctemplate][goog-ct].## Objectives
The project was started with these objectives:
* Move away from using [Node.js][nodejs] for backend template compilation.
* Must meet or exceed performance of the legacy system. The compiler can
potentially execute several times for each page view, so it needs to be
really fast.
* Improve performance over the legacy system.
* Minimize memory usage. For example, parsing can often create and discard a
high number of temporary strings.
* Support additional features for server-side compilation.
* High test coverage.
* Support syntax error recovery.
* Support a template validation mode.## Measured Results
* Average 20x performance increase over previous Node.js + JSON-Template
system.[license-tldr]:
https://tldrlegal.com/license/apache-license-2.0-(apache-2.0) "Apache 2.0 tl;dr"[jsont]:
http://json-template.googlecode.com/svn/trunk/doc/Introducing-JSON-Template.html[nodejs]:
http://nodejs.org[goog-ct]:
https://code.google.com/p/ctemplate/