Package com.iizix.js.build
Class HTMLSourcesManager
java.lang.Object
com.iizix.js.build.HTMLSourcesManager
The manager for HTML sources.
This class is used to handle e.g. iiziApp.html in the server in development mode or for iiziRun.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionvoid
compressHTMLFile
(File root, IWebServerCompression webServer, boolean doCompress, String fn, boolean isLocal) Compresses the specified HTML files and adds all files for redirection.void
compressHTMLFiles
(File root, IWebServerCompression webServer, boolean doCompress) Compresses the specified HTML files and adds all files for redirection.getHTMLSourceInfo
(File file) Gets the HTML source info for a file.static HTMLSourcesManager
getInstance
(IWebServerCompression webServer, ISourceResolver resolver) Gets the instance of the run support.
Method Details
getInstance
public static HTMLSourcesManager getInstance(IWebServerCompression webServer, ISourceResolver resolver) Gets the instance of the run support.getHTMLSourceInfo
Gets the HTML source info for a file.- Parameters:
file
- The file to use.- Throws:
FileNotFoundException
- If the file is not found.
compressHTMLFiles
public void compressHTMLFiles(File root, IWebServerCompression webServer, boolean doCompress) throws IOException Compresses the specified HTML files and adds all files for redirection. The CSS files are all compressed into one, and so for the JS files. The redirected file for the compressed and converted HTML source is also added.- Parameters:
root
- The root directory of the web server.webServer
- Web server compression implementor.doCompress
- Compression flag.- Throws:
IOException
- For I/O errors.
compressHTMLFile
public void compressHTMLFile(File root, IWebServerCompression webServer, boolean doCompress, String fn, boolean isLocal) throws IOException Compresses the specified HTML files and adds all files for redirection. The CSS files are all compressed into one, and so for the JS files. The redirected file for the compressed and converted HTML source is also added.- Parameters:
root
- The root directory of the web server.webServer
- Web server compression implementor, null for none.doCompress
- Compression flag.fn
- The HTML file name.isLocal
- Flag for local file (iiziRun).- Throws:
IOException
- For I/O errors.