|
|
|
@@ -7,45 +7,39 @@ function Build-UmbracoDocs
|
|
|
|
|
$src = "$($uenv.SolutionRoot)\src"
|
|
|
|
|
$out = "$($uenv.SolutionRoot)\build.out"
|
|
|
|
|
$tmp = "$($uenv.SolutionRoot)\build.tmp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$buildTemp = "$PSScriptRoot\temp"
|
|
|
|
|
$cache = 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prepare-Build -keep $uenv
|
|
|
|
|
|
|
|
|
|
################ Do the UI docs
|
|
|
|
|
# get a temp clean node env (will restore)
|
|
|
|
|
Sandbox-Node $uenv
|
|
|
|
|
|
|
|
|
|
Write-Host "Executing gulp docs"
|
|
|
|
|
|
|
|
|
|
push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client"
|
|
|
|
|
write "node version is:" > $tmp\belle-docs.log
|
|
|
|
|
&node -v >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "npm version is:" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&npm -v >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "executing npm install" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&npm install >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "executing bower install" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&npm install -g bower >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "installing gulp" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&npm install -g gulp >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "installing gulp-cli" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&npm install -g gulp-cli --quiet >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
write "building docs using gulp" >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
&gulp docs >> $tmp\belle-docs.log 2>&1
|
|
|
|
|
pop-location
|
|
|
|
|
|
|
|
|
|
# No need to build belle again if it exists
|
|
|
|
|
$belleAppJs = "$src\Umbraco.Web.UI\Umbraco\js\app.js"
|
|
|
|
|
if(-not (Test-Path $belleAppJs))
|
|
|
|
|
{
|
|
|
|
|
# get a temp clean node env (will restore)
|
|
|
|
|
Sandbox-Node $uenv
|
|
|
|
|
|
|
|
|
|
push-location "$($uenv.SolutionRoot)\src\Umbraco.Web.UI.Client"
|
|
|
|
|
write "node version is:" > $tmp\belle.log
|
|
|
|
|
&node -v >> $tmp\belle.log 2>&1
|
|
|
|
|
write "npm version is:" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm -v >> $tmp\belle.log 2>&1
|
|
|
|
|
write "cleaning npm cache" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm cache clean >> $tmp\belle.log 2>&1
|
|
|
|
|
write "installing bower" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm install -g bower >> $tmp\belle.log 2>&1
|
|
|
|
|
write "installing gulp" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm install -g gulp >> $tmp\belle.log 2>&1
|
|
|
|
|
write "installing gulp-cli" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm install -g gulp-cli --quiet >> $tmp\belle.log 2>&1
|
|
|
|
|
write "executing npm install" >> $tmp\belle.log 2>&1
|
|
|
|
|
&npm install >> $tmp\belle.log 2>&1
|
|
|
|
|
write "building docs using gulp" >> $tmp\belle.log 2>&1
|
|
|
|
|
&gulp docs >> $tmp\belle.log 2>&1
|
|
|
|
|
pop-location
|
|
|
|
|
|
|
|
|
|
# fixme - should we filter the log to find errors?
|
|
|
|
|
#get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}}
|
|
|
|
|
} else {
|
|
|
|
|
Write-Host "Skipping belle build, $belleAppJs already exists"
|
|
|
|
|
}
|
|
|
|
|
Write-Host "Completed gulp docs build"
|
|
|
|
|
|
|
|
|
|
# fixme - should we filter the log to find errors?
|
|
|
|
|
#get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}}
|
|
|
|
|
|
|
|
|
|
# change baseUrl
|
|
|
|
|
$baseUrl = "https://our.umbraco.org/apidocs/ui/"
|
|
|
|
|