/// <summary>
 /// Compiles the specified .scss files into CSS and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> CompileScssFiles(this IAssetPipeline pipeline, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/css; charset=UFT-8", sourceFiles)
            .CompileScss()
            .FingerprintUrls()
            .MinifyCss());
 }
Esempio n. 2
0
 /// <summary>
 /// Minifies the specified .css files.
 /// </summary>
 public static IEnumerable <IAsset> MinifyCssFiles(this IAssetPipeline pipeline, CssSettings settings, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/css; charset=UTF-8", sourceFiles)
            .FingerprintUrls()
            .AddResponseHeader("X-Content-Type-Options", "nosniff")
            .MinifyCss(settings));
 }
 /// <summary>
 /// Compiles .scss files into CSS and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The asset pipeline.</param>
 public static IEnumerable <IAsset> CompileScssFiles(this IAssetPipeline pipeline)
 {
     return(pipeline.AddFiles("text/css; charset=UTF-8", "**/*.scss")
            .CompileScss()
            .FingerprintUrls()
            .MinifyCss());
 }
Esempio n. 4
0
 /// <summary>
 /// Compiles the specified .less files into CSS and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> CompileLessFiles(this IAssetPipeline pipeline, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/css; charset=UFT-8", sourceFiles).EnforceFileExtensions(".less")
            .CompileLess()
            .FingerprintUrls()
            .AddResponseHeader("X-Content-Type-Options", "nosniff")
            .MinifyCss());
 }
 /// <summary>
 /// Compiles the specified .scss files into CSS and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> CompileScssFiles(this IAssetPipeline pipeline, WebOptimazerScssOptions options = null, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/css; charset=UFT-8", sourceFiles)
            .CompileScss(options)
            .FingerprintUrls()
            .AddResponseHeader("X-Content-Type-Options", "nosniff")
            .MinifyCss());
 }
Esempio n. 6
0
 /// <summary>
 /// Compiles .scss files into CSS and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The asset pipeline.</param>
 public static IEnumerable <IAsset> CompileScssFiles(this IAssetPipeline pipeline)
 {
     return(pipeline.AddFiles("text/css; charset=UTF-8", "**/*.scss")
            .CompileScss()
            //    .FingerprintUrls()
            .AddResponseHeader("X-Content-Type-Options", "nosniff")
            .MinifyCss());
 }
 /// <summary>
 /// Minifies tje specified .js files.
 /// </summary>
 public static IEnumerable <IAsset> MinifyJsFiles(this IAssetPipeline pipeline, CodeSettings settings, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("application/javascript; charset=UTF-8", sourceFiles)
            .MinifyJavaScript(settings));
 }
 /// <summary>
 ///  and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="moduleName"></param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> TransformHtmlFiles(this IAssetPipeline pipeline, string moduleName,
                                                       params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/javascript; charset=UFT-8", sourceFiles)
            .TransformHtml(moduleName));
 }
 /// <summary>
 /// Default folder is app
 /// </summary>
 /// <param name="pipeline">The asset pipeline.</param>
 /// <param name="moduleName"></param>
 public static IEnumerable <IAsset> TransformHtmlFiles(this IAssetPipeline pipeline, string moduleName)
 {
     return(pipeline.AddFiles("text/javascript; charset=UTF-8", "**/*.html")
            //.Concatenate()
            .TransformHtml(moduleName));
 }
Esempio n. 10
0
 /// <summary>
 /// Minifies the specified .css files.
 /// </summary>
 public static IEnumerable <IAsset> MinifyCssFiles(this IAssetPipeline pipeline, CssSettings settings, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/css; charset=UTF-8", sourceFiles)
            .FingerprintUrls()
            .MinifyCss(settings));
 }
 /// <summary>
 /// Compiles the specified TypeScript files into JavaScript (ES5) and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> CompileTypeScriptFiles(this IAssetPipeline pipeline, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("application/javascript; charset=UTF-8", sourceFiles)
            .CompileTypeScript()
            .MinifyJavaScript());
 }
Esempio n. 12
0
 /// <summary>
 /// Minifies the specified .html files.
 /// </summary>
 public static IEnumerable <IAsset> MinifyHtmlFiles(this IAssetPipeline pipeline, HtmlSettings settings, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/html; charset=UTF-8", sourceFiles)
            .MinifyHtml(settings));
 }
Esempio n. 13
0
 /// <summary>
 /// Minifies any .html file requested.
 /// </summary>
 public static IEnumerable <IAsset> MinifyHtmlFiles(this IAssetPipeline pipeline, HtmlSettings settings)
 {
     return(pipeline.AddFiles("text/html; charset=UTF-8", "**/*.html")
            .MinifyHtml(settings));
 }
Esempio n. 14
0
 /// <summary>
 /// Compiles the specified markdown files into HTML and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to compile.</param>
 public static IEnumerable <IAsset> CompileMarkdownFiles(this IAssetPipeline pipeline, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/html; charset=UTF-8", sourceFiles)
            .CompileMarkdown());
 }
Esempio n. 15
0
 /// <summary>
 /// Compiles markdown files into HTML and makes them servable in the browser.
 /// </summary>
 /// <param name="pipeline">The asset pipeline.</param>
 public static IEnumerable <IAsset> CompileMarkdownFiles(this IAssetPipeline pipeline)
 {
     return(pipeline.AddFiles("text/html; charset=UTF-8", "**/*.md")
            .CompileMarkdown());
 }
 /// <summary>
 /// Localizes the specified files.
 /// </summary>
 /// <param name="pipeline">The pipeline object.</param>
 /// <param name="contentType">The content type of the response. Example: "text/css; charset=UTF-8"</param>
 /// <param name="sourceFiles">A list of relative file names of the sources to localize.</param>
 public static IEnumerable <IAsset> LocalizeFiles <T>(this IAssetPipeline pipeline, string contentType, params string[] sourceFiles)
 {
     return(pipeline.AddFiles(contentType, sourceFiles)
            .Localize <T>());
 }
Esempio n. 17
0
 /// <summary>
 /// Minifies tje specified .js files.
 /// </summary>
 public static IEnumerable <IAsset> MinifyJsFiles(this IAssetPipeline pipeline, CodeSettings settings, params string[] sourceFiles)
 {
     return(pipeline.AddFiles("text/javascript; charset=UTF-8", sourceFiles)
            .AddResponseHeader("X-Content-Type-Options", "nosniff")
            .MinifyJavaScript(settings));
 }
Esempio n. 18
0
 /// <summary>
 /// Minifies any .css file requested.
 /// </summary>
 public static IEnumerable <IAsset> MinifyCssFiles(this IAssetPipeline pipeline, CssSettings settings)
 {
     return(pipeline.AddFiles("text/css; charset=UTF-8", "**/*.css")
            .FingerprintUrls()
            .MinifyCss(settings));
 }