Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ec90a3acd | |||
| b3cc5f9183 | |||
| ce99ec6d31 | |||
| 88d61a4d37 | |||
| 75f4535157 | |||
| 78bf75615f | |||
| 51649879cd | |||
| ab050eb7ac | |||
| 2461924a89 | |||
| 1b3fc9fb21 | |||
| 2e98651d62 | |||
| 704e981284 |
@@ -7,45 +7,39 @@ function Build-UmbracoDocs
|
|||||||
$src = "$($uenv.SolutionRoot)\src"
|
$src = "$($uenv.SolutionRoot)\src"
|
||||||
$out = "$($uenv.SolutionRoot)\build.out"
|
$out = "$($uenv.SolutionRoot)\build.out"
|
||||||
$tmp = "$($uenv.SolutionRoot)\build.tmp"
|
$tmp = "$($uenv.SolutionRoot)\build.tmp"
|
||||||
|
|
||||||
$buildTemp = "$PSScriptRoot\temp"
|
$buildTemp = "$PSScriptRoot\temp"
|
||||||
$cache = 2
|
$cache = 2
|
||||||
|
|
||||||
Prepare-Build -keep $uenv
|
Prepare-Build -keep $uenv
|
||||||
|
|
||||||
################ Do the UI docs
|
################ 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
|
Write-Host "Completed gulp docs build"
|
||||||
$belleAppJs = "$src\Umbraco.Web.UI\Umbraco\js\app.js"
|
|
||||||
if(-not (Test-Path $belleAppJs))
|
# fixme - should we filter the log to find errors?
|
||||||
{
|
#get-content .\build.tmp\belle-docs.log | %{ if ($_ -match "build") { write $_}}
|
||||||
# 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"
|
|
||||||
}
|
|
||||||
|
|
||||||
# change baseUrl
|
# change baseUrl
|
||||||
$baseUrl = "https://our.umbraco.org/apidocs/ui/"
|
$baseUrl = "https://our.umbraco.org/apidocs/ui/"
|
||||||
|
|||||||
@@ -51,13 +51,19 @@ function Prepare-Build
|
|||||||
|
|
||||||
if (-not $keep)
|
if (-not $keep)
|
||||||
{
|
{
|
||||||
Remove-Directory "$tmp"
|
Remove-Directory "$tmp"
|
||||||
mkdir "$tmp" > $null
|
Remove-Directory "$out"
|
||||||
|
|
||||||
Remove-Directory "$out"
|
|
||||||
mkdir "$out" > $null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path "$tmp"))
|
||||||
|
{
|
||||||
|
mkdir "$tmp" > $null
|
||||||
|
}
|
||||||
|
if (-not (Test-Path "$out"))
|
||||||
|
{
|
||||||
|
mkdir "$out" > $null
|
||||||
|
}
|
||||||
|
|
||||||
# ensure proper web.config
|
# ensure proper web.config
|
||||||
$webUi = "$src\Umbraco.Web.UI"
|
$webUi = "$src\Umbraco.Web.UI"
|
||||||
Store-WebConfig $webUi
|
Store-WebConfig $webUi
|
||||||
|
|||||||
Reference in New Issue
Block a user