public class JsSrcMain extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Constructor and Description |
|---|
JsSrcMain(GuiceSimpleScope apiCallScope,
SimplifyVisitor simplifyVisitor,
javax.inject.Provider<OptimizeBidiCodeGenVisitor> optimizeBidiCodeGenVisitorProvider,
javax.inject.Provider<GenJsCodeVisitor> genJsCodeVisitorProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
genJsFiles(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
String locale,
SoyMsgBundle msgBundle,
String outputPathFormat,
String inputPathsPrefix,
ErrorReporter errorReporter)
Generates JS source files given a Soy parse tree, an options object, an optional bundle of
translated messages, and information on where to put the output files.
|
List<String> |
genJsSrc(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle,
ErrorReporter errorReporter)
Generates JS source code given a Soy parse tree, an options object, and an optional bundle of
translated messages.
|
@Inject public JsSrcMain(GuiceSimpleScope apiCallScope, SimplifyVisitor simplifyVisitor, javax.inject.Provider<OptimizeBidiCodeGenVisitor> optimizeBidiCodeGenVisitorProvider, javax.inject.Provider<GenJsCodeVisitor> genJsCodeVisitorProvider)
apiCallScope - The scope object that manages the API call scope.simplifyVisitor - The instance of SimplifyVisitor to use.optimizeBidiCodeGenVisitorProvider - Provider for getting an instance of
OptimizeBidiCodeGenVisitor.genJsCodeVisitorProvider - Provider for getting an instance of GenJsCodeVisitor.public List<String> genJsSrc(SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyJsSrcOptions jsSrcOptions, @Nullable SoyMsgBundle msgBundle, ErrorReporter errorReporter)
soyTree - The Soy parse tree to generate JS source code for.jsSrcOptions - The compilation options relevant to this backend.msgBundle - The bundle of translated messages, or null to use the messages from the Soy
source.public void genJsFiles(SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyJsSrcOptions jsSrcOptions, @Nullable String locale, @Nullable SoyMsgBundle msgBundle, String outputPathFormat, String inputPathsPrefix, ErrorReporter errorReporter) throws SoySyntaxException, IOException
soyTree - The Soy parse tree to generate JS source code for.jsSrcOptions - The compilation options relevant to this backend.locale - The current locale that we're generating JS for, or null if not applicable.msgBundle - The bundle of translated messages, or null to use the messages from the Soy
source.outputPathFormat - The format string defining how to build the output file path
corresponding to an input file path.inputPathsPrefix - The input path prefix, or empty string if none.SoySyntaxException - If a syntax error is found.IOException - If there is an error in opening/writing an output JS file.