public.javadoc.org.spincast.plugins.jsclosurecompiler.SpincastJsClosureCompilerManagerDefault.html Maven / Gradle / Ivy
Show all versions of spincast-website Show documentation
SpincastJsClosureCompilerManagerDefault (org.spincast:spincast-framework 1.13.0 API)
org.spincast.plugins.jsclosurecompiler
Class SpincastJsClosureCompilerManagerDefault
- java.lang.Object
-
- org.spincast.plugins.jsclosurecompiler.SpincastJsClosureCompilerManagerDefault
-
- All Implemented Interfaces:
- SpincastJsClosureCompilerManager
public class SpincastJsClosureCompilerManagerDefault
extends Object
implements SpincastJsClosureCompilerManager
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastJsClosureCompilerManagerDefault(SpincastConfig spincastConfig,
SpincastUtils spincastUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
String
compile(File jsFile,
List<String> args)
Compile/Minify a js file.
String
compile(File jsFile,
String... args)
Compile/Minify a js file.
String
compile(List<File> jsFiles,
List<String> args)
Compile/minify multiple .js files
at a time and concatenate the result.
String
compile(List<File> jsFiles,
String... args)
Compile/minify multiple .js files
at a time and concatenate the result.
String
compile(String jsContent,
List<String> args)
Compile/Minify javascript content, as a String.
String
compile(String jsContent,
String... args)
Compile/Minify javascript content, as a String.
String
compileCustom(List<String> args)
Compile/Minify js/js files.
String
compileCustom(String... args)
Compile/Minify js/js files.
protected File
createJsFile(String jsContent)
protected SpincastConfig
getSpincastConfig()
protected SpincastUtils
getSpincastUtils()
-
-
Constructor Detail
-
SpincastJsClosureCompilerManagerDefault
@Inject
public SpincastJsClosureCompilerManagerDefault(SpincastConfig spincastConfig,
SpincastUtils spincastUtils)
-
Method Detail
-
getSpincastConfig
protected SpincastConfig getSpincastConfig()
-
getSpincastUtils
protected SpincastUtils getSpincastUtils()
-
compile
public String compile(String jsContent,
String... args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify javascript content, as a String.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
-
compile
public String compile(String jsContent,
List<String> args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify javascript content, as a String.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
-
compile
public String compile(File jsFile,
String... args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify a js file.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
-
compile
public String compile(File jsFile,
List<String> args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify a js file.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
-
compile
public String compile(List<File> jsFiles,
String... args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/minify multiple .js files
at a time and concatenate the result.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the concatenated and compiled javascript
content.
-
compile
public String compile(List<File> jsFiles,
List<String> args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/minify multiple .js files
at a time and concatenate the result.
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compile
in interface SpincastJsClosureCompilerManager
- Returns:
- the concatenated and compiled javascript
content.
-
compileCustom
public String compileCustom(String... args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify js/js files.
Using this method, you are responsive to specify
all the arguments passed to the closure compile
.jar file (inlcuding the files to target).
This can be useful if you want to
compile files specified using
globs patterns
instead of having to specify them one by one.
In other words, the executed command will be:
java -jar closure-compiler.jar [ARGS]
and you have to specify all the "[ARGS]
".
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compileCustom
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
-
compileCustom
public String compileCustom(List<String> args)
Description copied from interface: SpincastJsClosureCompilerManager
Compile/Minify js/js files.
Using this method, you are responsive to specify
all the arguments passed to the closure compile
.jar file (inlcuding the files to target).
This can be useful if you want to
compile files specified using
globs patterns
instead of having to specify them one by one.
In other words, the executed command will be:
java -jar closure-compiler.jar [ARGS]
and you have to specify all the "[ARGS]
".
Read the options documentation.
Note that you cannot use the "--js_output_file" option. The
method will take care of it by itself.
- Specified by:
compileCustom
in interface SpincastJsClosureCompilerManager
- Returns:
- the compiled/minified javascript
content.
Copyright © 2019. All rights reserved.