Package com.google.template.soy

Examples of com.google.template.soy.SoyFileSet$SoyFileSetFactory


   * @param args Not used.
   */
  public static void main(String[] args) {

    // Compile the template.
    SoyFileSet sfs = (new SoyFileSet.Builder()).add(Resources.getResource("simple.soy")).build();
    SoyTofu tofu = sfs.compileToTofu();

    // Example 1.
    writeExampleHeader();
    System.out.println(tofu.newRenderer("soy.examples.simple.helloWorld").render());

View Full Code Here


    }

    Injector injector = Guice.createInjector(new SoyModule(), new XliffMsgPluginModule());

    SoyFileSet.Builder sfsBuilder = injector.getInstance(SoyFileSet.Builder.class);
    SoyFileSet sfs = sfsBuilder
        .add(Resources.getResource("simple.soy"))
        .add(Resources.getResource("features.soy"))
        .setCompileTimeGlobals(Resources.getResource("FeaturesUsage_globals.txt"))
        .build();
    SoyTofu tofu = sfs.compileToTofu().forNamespace("soy.examples.features");

    SoyMsgBundle msgBundle;
    if (locale.length() > 0) {
      // Use translations from an XLIFF file.
      SoyMsgBundleHandler msgBundleHandler = injector.getInstance(SoyMsgBundleHandler.class);
View Full Code Here

TOP

Related Classes of com.google.template.soy.SoyFileSet$SoyFileSetFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.