snippet script
This commit is contained in:
Родитель
db007c9fc9
Коммит
ebacff289d
|
@ -35,7 +35,7 @@
|
|||
<Link>ai.min.js.map</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\..\bundle\snippet\snippet.html">
|
||||
<Content Include="..\..\snippet\snippet.html">
|
||||
<Link>snippet.html</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
# build snippet.html from minified javascript snippet
|
||||
Param(
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[parameter(Mandatory=$true, HelpMessage="The project directory.")]
|
||||
[string]$projectDir,
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[parameter(Mandatory=$false, HelpMessage="The relative output path/format.")]
|
||||
[string]$outputPath="snippet.html",
|
||||
|
@ -37,7 +33,7 @@ Param(
|
|||
#>
|
||||
function Get-OutputPath($flavor) {
|
||||
$path = $outputPath -replace "\.", "$($flavor)."
|
||||
return "$($projectDir)\bundle\snippet\$($path)"
|
||||
return ".\snippet\$($path)"
|
||||
}
|
||||
|
||||
<#
|
||||
|
@ -51,7 +47,7 @@ function Get-OutputPath($flavor) {
|
|||
function Read-MinifiedSnippet()
|
||||
{
|
||||
# find the file path with preference for release build
|
||||
$snippetPath = "$($projectDir)\bundle\snippet\snippet.min.js"
|
||||
$snippetPath = ".\bundle\snippet\snippet.min.js"
|
||||
|
||||
# read the minified snippet
|
||||
$snippet = gc $snippetPath
|
||||
|
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче