Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IRuntimeMinifier

    Used for bundling and minifying web assets at runtime

    Namespace: Umbraco.Cms.Core.WebAssets
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IRuntimeMinifier

    Properties

    View Source

    CacheBuster

    Returns the cache buster value

    Declaration
    string CacheBuster { get; }
    Property Value
    Type Description
    System.String

    Methods

    View Source

    CreateCssBundle(String, BundlingOptions, String[])

    Creates a css bundle

    Declaration
    void CreateCssBundle(string bundleName, BundlingOptions bundleOptions, params string[] filePaths)
    Parameters
    Type Name Description
    System.String bundleName
    BundlingOptions bundleOptions
    System.String[] filePaths
    Remarks

    All files must be absolute paths, relative paths will throw

    View Source

    CreateJsBundle(String, BundlingOptions, String[])

    Creates a JS bundle

    Declaration
    void CreateJsBundle(string bundleName, BundlingOptions bundleOptions, params string[] filePaths)
    Parameters
    Type Name Description
    System.String bundleName
    BundlingOptions bundleOptions
    System.String[] filePaths
    Remarks

    All files must be absolute paths, relative paths will throw

    View Source

    GetCssAssetPathsAsync(String)

    Returns the asset paths for the css bundle name

    Declaration
    Task<IEnumerable<string>> GetCssAssetPathsAsync(string bundleName)
    Parameters
    Type Name Description
    System.String bundleName
    Returns
    Type Description
    Task<IEnumerable<System.String>>

    If debug mode is enabled this will return all asset paths (not bundled), else it will return a bundle URL

    View Source

    GetJsAssetPathsAsync(String)

    Returns the asset paths for the JS bundle name

    Declaration
    Task<IEnumerable<string>> GetJsAssetPathsAsync(string bundleName)
    Parameters
    Type Name Description
    System.String bundleName
    Returns
    Type Description
    Task<IEnumerable<System.String>>

    If debug mode is enabled this will return all asset paths (not bundled), else it will return a bundle URL

    View Source

    MinifyAsync(String, AssetType)

    Minify the file content, of a given type

    Declaration
    Task<string> MinifyAsync(string fileContent, AssetType assetType)
    Parameters
    Type Name Description
    System.String fileContent
    AssetType assetType
    Returns
    Type Description
    Task<System.String>
    View Source

    RenderCssHereAsync(String)

    Renders the html link tag for the bundle

    Declaration
    Task<string> RenderCssHereAsync(string bundleName)
    Parameters
    Type Name Description
    System.String bundleName
    Returns
    Type Description
    Task<System.String>

    An html encoded string

    View Source

    RenderJsHereAsync(String)

    Renders the html script tag for the bundle

    Declaration
    Task<string> RenderJsHereAsync(string bundleName)
    Parameters
    Type Name Description
    System.String bundleName
    Returns
    Type Description
    Task<System.String>

    An html encoded string

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • CacheBuster
    • Methods
      • CreateCssBundle(String, BundlingOptions, String[])
      • CreateJsBundle(String, BundlingOptions, String[])
      • GetCssAssetPathsAsync(String)
      • GetJsAssetPathsAsync(String)
      • MinifyAsync(String, AssetType)
      • RenderCssHereAsync(String)
      • RenderJsHereAsync(String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX