Package com.google.template.soy.jssrc

Examples of com.google.template.soy.jssrc.SoyJsSrcOptions


      sfsBuilder.setCompileTimeGlobals(new File(compileTimeGlobalsFile));
    }
    SoyFileSet sfs = sfsBuilder.build();

    // Create SoyJsSrcOptions.
    SoyJsSrcOptions jsSrcOptions = new SoyJsSrcOptions();
    jsSrcOptions.setIsUsingIjData(isUsingIjData);
    jsSrcOptions.setCodeStyle(codeStyle);
    jsSrcOptions.setShouldGenerateJsdoc(shouldGenerateJsdoc);
    jsSrcOptions.setShouldProvideRequireSoyNamespaces(shouldProvideRequireSoyNamespaces);
    jsSrcOptions.setShouldDeclareTopLevelNamespaces(shouldDeclareTopLevelNamespaces);
    jsSrcOptions.setShouldGenerateGoogMsgDefs(shouldGenerateGoogMsgDefs);
    jsSrcOptions.setGoogMsgsAreExternal(googMsgsAreExternal);
    jsSrcOptions.setBidiGlobalDir(bidiGlobalDir);
    jsSrcOptions.setUseGoogIsRtlForBidiGlobalDir(useGoogIsRtlForBidiGlobalDir);

    // Compile.
    if (locales.size() == 0) {
      // Not generating localized JS.
      sfs.compileToJsSrcFiles(outputPathFormat, inputPrefix, jsSrcOptions, locales, null);
View Full Code Here


public class SoyJsSrcOptionsTest extends TestCase {


  public void testClone() {

    SoyJsSrcOptions options = new SoyJsSrcOptions();
    options.setShouldGenerateGoogMsgDefs(true);
    options.setBidiGlobalDir(1);

    SoyJsSrcOptions clonedOptions = options.clone();
    assertEquals(options.getBidiGlobalDir(),
        clonedOptions.getBidiGlobalDir());
    assertEquals(options.getUseGoogIsRtlForBidiGlobalDir(),
        clonedOptions.getUseGoogIsRtlForBidiGlobalDir());
    assertEquals(options.shouldGenerateGoogMsgDefs(), clonedOptions.shouldGenerateGoogMsgDefs());
    assertEquals(options.getCodeStyle(), clonedOptions.getCodeStyle());
  }
View Full Code Here

TOP

Related Classes of com.google.template.soy.jssrc.SoyJsSrcOptions

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.