Skip to content

Instantly share code, notes, and snippets.

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<ApplicationInsightsResourceId>/subscriptions/d0f630d1-e1d3-48fd-9a10-866fdc993495/resourcegroups/TEST-Minetilbud/providers/microsoft.insights/components/test-minetilbud-CloudAPI</ApplicationInsightsResourceId>
<ApplicationInsightsAnnotationResourceId>/subscriptions/d0f630d1-e1d3-48fd-9a10-866fdc993495/resourceGroups/TEST-Minetilbud/providers/microsoft.insights/components/test-minetilbud-CloudAPI</ApplicationInsightsAnnotationResourceId>
<PackageTargetFallback>portable-net45+win8</PackageTargetFallback>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
{
"css/unicorn.css": "css/unicorn-d41d8cd98f.css",
"js/unicorn.js": "js/unicorn-273c2c123f.js"
}
/*eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */
'use strict';
const gulp = require('gulp');
const debug = require('gulp-debug');
const del = require('del');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const concat = require('gulp-concat');
const postcss = require('gulp-postcss');
using System.Web;
using Sitecore.StaticAssets.Infrastructure;
namespace Sitecore.StaticAssets.Html.Helpers
{
public static class StaticAssets
{
private static StaticAssetResolver _assetResolver;
public static void Initialize(StaticAssetResolver staticAssetResolver)
using System.Collections.Generic;
namespace Sitecore.StaticAssets.Infrastructure
{
public class AssetCollection : Dictionary<string, string>
{
}
}
using System.Diagnostics;
using System.IO;
using System.Web.Caching;
using Newtonsoft.Json;;
namespace Sitecore.StaticAssets.Infrastructure
{
public class StaticAssetResolver
{
private readonly string _assetsJsonPath;
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<initialize>
<processor type="Sitecore.StaticAssets.Pipelines.InitializeStaticAssetsResolver, Sitecore.StaticAssets">
<!-- CONFIGURATION: Defines the file path for the asset manifest -->
<param desc="Asset path">~dist/rev-manifest.json</param>
</processor>
</initialize>
using Sitecore.Pipelines;
using Sitecore.StaticAssets.Infrastructure;
namespace Sitecore.StaticAssets.Pipelines
{
public class InitializeStaticAssetsResolver
{
private readonly string _assetPath;
public InitializeStaticAssetsResolver(string assetPath)
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForMsdeployDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
@using Sitecore.StaticAssets.Html.Helpers
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
@StaticAssets.RenderStyle("/dist/styles/styles.all.css")
</head>
<body>
@RenderBody()