FilesTransformer
Assembly: ServiceStack.dll
View Source
Declaration
public class FilesTransformer
Properties
None
Apply no file transformations
View Source
Declaration
public static FilesTransformer None { get; }
Default
Default File Transformer options: .html:
- removes line comments <!---: ... -->
- removes empty whitespace lines
- minifies in !DebugMode with ServiceStack.Html.Minifiers.HtmlAdvanced .js:
- removes lines starting with: 'import ', 'declare '
- removes line comments /*: ... /
- removes empty whitespace lines
- minifies in !DebugMode with ServiceStack.Html.Minifiers.JavaScript .css:
- removes line comments /*: ... /
- removes empty whitespace lines
View Source
Declaration
public static FilesTransformer Default { get; }
FileExtensions
View Source
Declaration
public Dictionary<string, FileTransformerOptions> FileExtensions { get; }
HtmlLineTransformers
View Source
Declaration
public static List<HtmlModuleLine> HtmlLineTransformers { get; }
JsLineTransformers
View Source
Declaration
public static List<HtmlModuleLine> JsLineTransformers { get; }
CssLineTransformers
View Source
Declaration
public static List<HtmlModuleLine> CssLineTransformers { get; }
Methods
Defaults(Nullable<Boolean>, Action<FilesTransformer>)
View Source
Declaration
public static FilesTransformer Defaults(bool? debugMode = null, Action<FilesTransformer> with = null)
Returns
ServiceStack.HtmlModules.FilesTransformer
Parameters
Type | Name |
---|---|
System.Nullable<System.Boolean> | debugMode |
System.Action<ServiceStack.HtmlModules.FilesTransformer> | with |
Without(Run)
View Source
Declaration
public FilesTransformer Without(Run behaviour)
Returns
ServiceStack.HtmlModules.FilesTransformer
Parameters
Type | Name |
---|---|
ServiceStack.Run | behaviour |
GetExt(String)
View Source
Declaration
public FileTransformerOptions GetExt(string fileExt)
Returns
ServiceStack.HtmlModules.FileTransformerOptions
Parameters
Type | Name |
---|---|
System.String | fileExt |
ReadAll(IVirtualFile)
View Source
Declaration
public string ReadAll(IVirtualFile file)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
Clone(Action<FilesTransformer>)
View Source
Declaration
public FilesTransformer Clone(Action<FilesTransformer> with = null)
Returns
ServiceStack.HtmlModules.FilesTransformer
Parameters
Type | Name |
---|---|
System.Action<ServiceStack.HtmlModules.FilesTransformer> | with |
RecreateDirectory(String, Int32)
View Source
Declaration
public static void RecreateDirectory(string dirPath, int timeoutMs = 1000)
Parameters
Type | Name |
---|---|
System.String | dirPath |
System.Int32 | timeoutMs |
CopyAll(IVirtualFiles, IVirtualFiles, Boolean, Func<IVirtualFile, Boolean>, Action<IVirtualFile, String>)
View Source
Declaration
public void CopyAll(IVirtualFiles source, IVirtualFiles target, bool cleanTarget = false, Func<IVirtualFile, bool> ignore = null, Action<IVirtualFile, string> afterCopy = null)
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | source |
ServiceStack.IO.IVirtualFiles | target |
System.Boolean | cleanTarget |
System.Func<ServiceStack.IO.IVirtualFile,System.Boolean> | ignore |
System.Action<ServiceStack.IO.IVirtualFile,System.String> | afterCopy |