Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a54cdb583 | |||
| d580153c9a |
@@ -1,44 +0,0 @@
|
|||||||
$uenv=build/build.ps1 -get
|
|
||||||
|
|
||||||
$src = "$($uenv.SolutionRoot)\src"
|
|
||||||
$tmp = $uenv.BuildTemp
|
|
||||||
$out = $uenv.BuildOutput
|
|
||||||
$DocFxJson = "$src\ApiDocs\docfx.json"
|
|
||||||
$DocFxSiteOutput = "$tmp\_site\*.*"
|
|
||||||
|
|
||||||
################ Do the UI docs
|
|
||||||
$uenv.CompileBelle()
|
|
||||||
|
|
||||||
"Moving to Umbraco.Web.UI.Client folder"
|
|
||||||
cd .\src\Umbraco.Web.UI.Client
|
|
||||||
|
|
||||||
"Generating the docs and waiting before executing the next commands"
|
|
||||||
& gulp docs | Out-Null
|
|
||||||
|
|
||||||
# change baseUrl
|
|
||||||
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
|
|
||||||
$IndexPath = "./docs/api/index.html"
|
|
||||||
(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
|
|
||||||
|
|
||||||
# zip it
|
|
||||||
& $uenv.BuildEnv.Zip a -tzip -r "$out\ui-docs.zip" "$src\Umbraco.Web.UI.Client\docs\api\*.*"
|
|
||||||
|
|
||||||
|
|
||||||
################ Do the c# docs
|
|
||||||
|
|
||||||
# Build the solution in debug mode
|
|
||||||
$SolutionPath = Join-Path -Path $src -ChildPath "umbraco.sln"
|
|
||||||
#$uenv.CompileUmbraco()
|
|
||||||
|
|
||||||
#restore nuget packages
|
|
||||||
$uenv.RestoreNuGet()
|
|
||||||
|
|
||||||
# run DocFx
|
|
||||||
$DocFx = $uenv.BuildEnv.DocFx
|
|
||||||
|
|
||||||
Write-Host "$DocFxJson"
|
|
||||||
& $DocFx metadata $DocFxJson
|
|
||||||
& $DocFx build $DocFxJson
|
|
||||||
|
|
||||||
# zip it
|
|
||||||
& $uenv.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
|
|
||||||
+13
-14
@@ -430,19 +430,16 @@
|
|||||||
$this.CopyFile("$($this.SolutionRoot)\build\Azure\azuregalleryrelease.ps1", $this.BuildOutput)
|
$this.CopyFile("$($this.SolutionRoot)\build\Azure\azuregalleryrelease.ps1", $this.BuildOutput)
|
||||||
})
|
})
|
||||||
|
|
||||||
$ubuild.DefineMethod("PrepareCSharpDocs",
|
$ubuild.DefineMethod("BuildCSharpDocs",
|
||||||
{
|
{
|
||||||
Write-Host "Prepare C# Documentation"
|
Write-Host "Building C# Documentation"
|
||||||
|
|
||||||
$src = "$($this.SolutionRoot)\src"
|
$src = "$($this.SolutionRoot)\src"
|
||||||
$tmp = $this.BuildTemp
|
$tmp = $this.BuildTemp
|
||||||
$out = $this.BuildOutput
|
$out = $this.BuildOutput
|
||||||
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
|
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
|
||||||
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
|
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
|
||||||
|
|
||||||
|
|
||||||
#restore nuget packages
|
|
||||||
$this.RestoreNuGet()
|
|
||||||
# run DocFx
|
# run DocFx
|
||||||
$DocFx = $this.BuildEnv.DocFx
|
$DocFx = $this.BuildEnv.DocFx
|
||||||
|
|
||||||
@@ -453,24 +450,26 @@
|
|||||||
& $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
|
& $this.BuildEnv.Zip a -tzip -r "$out\csharp-docs.zip" $DocFxSiteOutput
|
||||||
})
|
})
|
||||||
|
|
||||||
$ubuild.DefineMethod("PrepareAngularDocs",
|
$ubuild.DefineMethod("BuildAngularDocs",
|
||||||
{
|
{
|
||||||
Write-Host "Prepare Angular Documentation"
|
Write-Host "Building Angular Documentation"
|
||||||
|
|
||||||
$src = "$($this.SolutionRoot)\src"
|
$src = "$($this.SolutionRoot)\src"
|
||||||
$out = $this.BuildOutput
|
$out = $this.BuildOutput
|
||||||
|
|
||||||
$this.CompileBelle()
|
# Check if the solution has been built
|
||||||
|
if (!(Test-Path "$src\Umbraco.Web.UI.Client\node_modules")) {throw "Umbraco needs to be built before generating the Angular Docs"}
|
||||||
|
|
||||||
"Moving to Umbraco.Web.UI.Client folder"
|
Push-Location "$src\Umbraco.Web.UI.Client"
|
||||||
cd .\src\Umbraco.Web.UI.Client
|
|
||||||
|
|
||||||
"Generating the docs and waiting before executing the next commands"
|
"Generating the docs and waiting before executing the next commands"
|
||||||
& gulp docs | Out-Null
|
& gulp docs | Out-Null
|
||||||
|
|
||||||
|
Pop-Location
|
||||||
|
|
||||||
# change baseUrl
|
# change baseUrl
|
||||||
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
|
$BaseUrl = "https://our.umbraco.com/apidocs/v8/ui/"
|
||||||
$IndexPath = "./docs/api/index.html"
|
$IndexPath = "$src\Umbraco.Web.UI.Client\docs\api\index.html"
|
||||||
(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
|
(Get-Content $IndexPath).replace('location.href.replace(rUrl, indexFile)', "`'" + $BaseUrl + "`'") | Set-Content $IndexPath
|
||||||
|
|
||||||
# zip it
|
# zip it
|
||||||
|
|||||||
Reference in New Issue
Block a user