This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UsingTask TaskName="LDownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | |
<ParameterGroup> | |
<Url ParameterType="System.String" Required="true" /> | |
<File ParameterType="System.String" Required="false" /> | |
<OutputFolder ParameterType="System.String" Required="false" /> | |
<OnlyIfNewer ParameterType="System.Boolean" Required="false" /> | |
</ParameterGroup> | |
<Task> | |
<Using Namespace="System.Web"/> | |
<Code Type="Fragment" Language="cs"><![CDATA[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Drawing | |
function Process | |
{ | |
Param($In, $OutFile, $Square, $W, $H, $BG, $ResizeW) | |
$file = Get-Item $In | |
$img = [System.Drawing.Image]::FromFile($file) | |
# Set the target image size | |
$destWidth = $img.Width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A experiment for quicker builds. | |
gulp.task('watch:typescript:quick', function () { | |
return gulp.watch(files.tsFiles).on("change", function(file) { | |
// Workaround to keep original folder structure | |
var currentDirectory = path.dirname(file.path); | |
var sourceDirectory = 'scripts'; | |
var index = currentDirectory.indexOf(sourceDirectory); | |
var relativeDirectory = currentDirectory.slice(index + sourceDirectory.length + 1); | |
var outputDirectory = __dirname + "\\scripts\\output" | |
if (relativeDirectory) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Import any parent target files. --> | |
<Import Condition="Exists('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., $(MSBuildThisFile)))\$(MSBuildThisFile)')" Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., $(MSBuildThisFile)))\$(MSBuildThisFile)"/> | |
<!-- Include your logic here for the current level. --> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingTask TaskName="GetFirstItem" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | |
<ParameterGroup> | |
<Items ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" /> | |
<FirstItem ParameterType="System.String" Output="true" Required="false" /> | |
</ParameterGroup> | |
<Task> | |
<Using Namespace="System.Linq"/> | |
<Code Type="Fragment" Language="cs">FirstItem = Items.First().ItemSpec;</Code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | |
<ParameterGroup> | |
<Url ParameterType="System.String" Required="true" /> | |
<File ParameterType="System.String" Required="false" /> | |
<OutputFolder ParameterType="System.String" Required="false" /> | |
</ParameterGroup> | |
<Task> | |
<Using Namespace="System.Web"/> |