org.plovr
Class Config
java.lang.Object
org.plovr.Config
- All Implemented Interfaces:
- Comparable<Config>
public final class Config
- extends Object
- implements Comparable<Config>
Field Summary |
static String |
GLOBAL_SCOPE_NAME
This is the name of the scope that all global variables will be
put into if the global-scope-name argument is supplied in the
plovr config. |
GLOBAL_SCOPE_NAME
public static final String GLOBAL_SCOPE_NAME
- This is the name of the scope that all global variables will be
put into if the global-scope-name argument is supplied in the
plovr config. This scope name is never externally visible, but it
does have the effect of shadowing access to any page-scope
globals of that name.
For example, if "$" were chosen, then that would shadow the
global jQuery object, which would be problematic for developers
who were using the Compiler with jQuery. As "a" is unlikely to be
supplied as an extern, it is a good choice for the GLOBAL_SCOPE_NAME.
- See Also:
- Constant Field Values
builder
public static Config.Builder builder(File relativePathBase,
File configFile,
String rootConfigFileContent)
builder
public static Config.Builder builder(Config config)
builderForTesting
public static Config.Builder builderForTesting()
- Create a builder that can be used for testing. Paths will be resolved
against the root folder of the system.
getId
public String getId()
getRootConfigFileContent
public String getRootConfigFileContent()
getManifest
public Manifest getManifest()
getModuleConfig
public ModuleConfig getModuleConfig()
hasModules
public boolean hasModules()
getSoyFunctionPlugins
public ImmutableList<String> getSoyFunctionPlugins()
hasSoyFunctionPlugins
public boolean hasSoyFunctionPlugins()
getCompilationMode
public CompilationMode getCompilationMode()
getWarningLevel
public WarningLevel getWarningLevel()
getOutputFile
public File getOutputFile()
getOutputWrapper
public String getOutputWrapper()
- Returns:
- null if no output wrapper has been set
getOutputCharset
public Charset getOutputCharset()
getJsContentType
public String getJsContentType()
- The value of the Content-Type header to use when writing JavaScript content
in response to an HTTP request.
getOutputWrapperMarker
public String getOutputWrapperMarker()
- Returns:
- null if no output wrapper has been set
shouldFingerprintJsFiles
public boolean shouldFingerprintJsFiles()
getTreatWarningsAsErrors
public boolean getTreatWarningsAsErrors()
getDocumentationOutputDirectory
public File getDocumentationOutputDirectory()
getConfigFile
public File getConfigFile()
isOutOfDate
public boolean isOutOfDate()
getGlobalScopeName
public String getGlobalScopeName()
getVariableMapInputFile
public File getVariableMapInputFile()
getVariableMapOutputFile
public File getVariableMapOutputFile()
getPropertyMapInputFile
public File getPropertyMapInputFile()
getPropertyMapOutputFile
public File getPropertyMapOutputFile()
getTestTemplate
public File getTestTemplate()
getTestExcludePaths
public Set<File> getTestExcludePaths()
getTestFile
@Nullable
public File getTestFile(String path)
- Parameters:
path
- a relative path, such as "foo/bar_test.js" or
"foo/bar_test.html".
- Returns:
- the file under a test directory, if it exists, or null
getCompilerOptions
public CompilerOptions getCompilerOptions(PlovrClosureCompiler compiler)
toString
public String toString()
- Overrides:
toString
in class Object
compareTo
public int compareTo(Config otherConfig)
- Configs are compared by their id so they can be sorted alphabetically.
- Specified by:
compareTo
in interface Comparable<Config>