Search in sources :

Example 1 with CoreFormatters

use of com.squarespace.template.plugins.CoreFormatters in project template-compiler by Squarespace.

the class TemplateC method compiler.

protected Compiler compiler() {
    FormatterTable formatterTable = new FormatterTable();
    PredicateTable predicateTable = new PredicateTable();
    // core
    formatterTable.register(new CoreFormatters());
    predicateTable.register(new CorePredicates());
    // TODO: dynamic classpath scan and registration of plugin jars.
    // squarespace
    formatterTable.register(new CommerceFormatters());
    formatterTable.register(new ContentFormatters());
    formatterTable.register(new SocialFormatters());
    formatterTable.register(new InternationalFormatters());
    predicateTable.register(new CommercePredicates());
    predicateTable.register(new ContentPredicates());
    predicateTable.register(new SlidePredicates());
    predicateTable.register(new SocialPredicates());
    predicateTable.register(new InternationalPredicates());
    return new Compiler(formatterTable, predicateTable);
}
Also used : InternationalFormatters(com.squarespace.template.plugins.platform.i18n.InternationalFormatters) Compiler(com.squarespace.template.Compiler) PredicateTable(com.squarespace.template.PredicateTable) InternationalPredicates(com.squarespace.template.plugins.platform.i18n.InternationalPredicates) CorePredicates(com.squarespace.template.plugins.CorePredicates) ContentFormatters(com.squarespace.template.plugins.platform.ContentFormatters) CommercePredicates(com.squarespace.template.plugins.platform.CommercePredicates) CommerceFormatters(com.squarespace.template.plugins.platform.CommerceFormatters) SocialPredicates(com.squarespace.template.plugins.platform.SocialPredicates) ContentPredicates(com.squarespace.template.plugins.platform.ContentPredicates) CoreFormatters(com.squarespace.template.plugins.CoreFormatters) SlidePredicates(com.squarespace.template.plugins.platform.SlidePredicates) FormatterTable(com.squarespace.template.FormatterTable) SocialFormatters(com.squarespace.template.plugins.platform.SocialFormatters)

Example 2 with CoreFormatters

use of com.squarespace.template.plugins.CoreFormatters in project template-compiler by Squarespace.

the class UnitTestBase method formatterTable.

public FormatterTable formatterTable() {
    FormatterTable table = new FormatterTable();
    table.register(new CoreFormatters());
    table.register(new UnitTestFormatters());
    return table;
}
Also used : CoreFormatters(com.squarespace.template.plugins.CoreFormatters)

Example 3 with CoreFormatters

use of com.squarespace.template.plugins.CoreFormatters in project template-compiler by Squarespace.

the class TemplateC method formatterTable.

protected static FormatterTable formatterTable() {
    FormatterTable t = new FormatterTable();
    t.register(new CoreFormatters());
    t.register(new CommerceFormatters());
    t.register(new ContentFormatters());
    t.register(new SocialFormatters());
    t.register(new InternationalFormatters());
    return t;
}
Also used : InternationalFormatters(com.squarespace.template.plugins.platform.i18n.InternationalFormatters) ContentFormatters(com.squarespace.template.plugins.platform.ContentFormatters) CommerceFormatters(com.squarespace.template.plugins.platform.CommerceFormatters) CoreFormatters(com.squarespace.template.plugins.CoreFormatters) FormatterTable(com.squarespace.template.FormatterTable) SocialFormatters(com.squarespace.template.plugins.platform.SocialFormatters)

Aggregations

CoreFormatters (com.squarespace.template.plugins.CoreFormatters)3 FormatterTable (com.squarespace.template.FormatterTable)2 CommerceFormatters (com.squarespace.template.plugins.platform.CommerceFormatters)2 ContentFormatters (com.squarespace.template.plugins.platform.ContentFormatters)2 SocialFormatters (com.squarespace.template.plugins.platform.SocialFormatters)2 InternationalFormatters (com.squarespace.template.plugins.platform.i18n.InternationalFormatters)2 Compiler (com.squarespace.template.Compiler)1 PredicateTable (com.squarespace.template.PredicateTable)1 CorePredicates (com.squarespace.template.plugins.CorePredicates)1 CommercePredicates (com.squarespace.template.plugins.platform.CommercePredicates)1 ContentPredicates (com.squarespace.template.plugins.platform.ContentPredicates)1 SlidePredicates (com.squarespace.template.plugins.platform.SlidePredicates)1 SocialPredicates (com.squarespace.template.plugins.platform.SocialPredicates)1 InternationalPredicates (com.squarespace.template.plugins.platform.i18n.InternationalPredicates)1