Creates powershell file to do the build, this detects if you have sandcastle installed first, also overwrites the default TOC.css file with a custom slightly nicer version for the output.

This commit is contained in:
Shannon
2014-01-24 18:23:37 +11:00
parent d66e2e52e9
commit b314bff127
5 changed files with 203 additions and 38 deletions

2
.gitignore vendored
View File

@@ -107,4 +107,4 @@ src/Umbraco.Web.UI/[Cc]onfig/appSettings.config
src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config
src/Umbraco.Web.UI/umbraco/plugins/*
src/Umbraco.Web.UI/umbraco/js/init.js
build/Help/*
build/ApiDocs/Output/*

170
build/ApiDocs/TOC.css Normal file
View File

@@ -0,0 +1,170 @@
/* File : TOC.css
// Author : Eric Woodruff (Eric@EWoodruff.us)
// Updated : 09/07/2007
//
// Stylesheet for the table of content
*/
*
{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
body
{
font-family: Segoe UI, Arial, Verdana, Helvetica, sans-serif;
font-size: 0.9em;
background-color: white;
color: White;
overflow: hidden;
}
input
{
padding:5px;
margin: 3px 0px 3px 0px
}
img
{
border: 0;
margin-left: 5px;
margin-right: 2px;
}
img.TreeNodeImg
{
cursor: pointer;
}
img.TOCLink
{
cursor: pointer;
margin-left: 0;
margin-right: 0;
}
a.SelectedNode, a.UnselectedNode
{
color: #333;
text-decoration: none;
padding: 1px 3px 1px 3px;
white-space: nowrap;
}
a.SelectedNode
{
background-color: #ffffff;
border: solid 1px #999999;
padding: 0px 2px 0px 2px;
}
a.UnselectedNode:hover, a.SelectedNode:hover
{
background-color: #cccccc;
border: solid 1px #999999;
padding: 0px 2px 0px 2px;
}
.Visible
{
display: block;
margin-left: 2em;
}
.Hidden
{
display: none;
}
.Tree
{
background-color: #fff;
color: #333;
width: 300px;
overflow: auto;
}
.TreeNode, .TreeItem
{
white-space: nowrap;
margin: 2px 2px 2px 2px;
}
.TOCDiv
{
position: relative;
float: left;
width: 300px;
height: 100%;
}
.TOCSizer
{
clear: none;
float: left;
width: 10px;
height: 100%;
background-image: url("Splitter.gif");
background-position:center center;
background-repeat:no-repeat;
position: relative;
cursor: w-resize;
border-left: solid 1px #CCC;
}
.TopicContent
{
position: relative;
float: right;
background-color: white;
height: 100%;
}
.SearchOpts
{
padding: 5px 5px 10px 5px;
color: black;
width: 300px;
border-bottom: solid lightgrey 1px;
height: 110px !important;
}
.NavOpts
{
padding: 5px 5px 6px 5px;
color: black;
width: 300px;
border-bottom: solid lightgrey 1px;
}
.NavOpts img {
display:inline-block;
margin: 0px 5px 0px 5px;
}
.IndexOpts
{
padding: 5px 5px 6px 5px;
color: black;
width: 300px;
border-bottom: solid lightgrey 1px;
}
.IndexItem
{
white-space: nowrap;
margin: 2px 2px 2px 2px;
}
.IndexSubItem
{
white-space: nowrap;
margin: 2px 2px 2px 12px;
}
.PaddedText
{
margin: 10px 10px 10px 10px;
}

View File

@@ -16,7 +16,7 @@
<Name>Documentation</Name>
<!-- SHFB properties -->
<FrameworkVersion>.NET Framework 4.5</FrameworkVersion>
<OutputPath>.\Help\</OutputPath>
<OutputPath>.\Output\</OutputPath>
<HtmlHelpName>UmbracoClassLibrary</HtmlHelpName>
<Language>en-US</Language>
<BuildAssemblerVerbosity>OnlyErrors</BuildAssemblerVerbosity>
@@ -38,10 +38,10 @@
<VisibleItems>Attributes, InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems>
<ComponentConfigurations />
<DocumentationSources>
<DocumentationSource sourceFile="..\src\Umbraco.Core\Umbraco.Core.csproj" />
<DocumentationSource sourceFile="..\src\Umbraco.Core\bin\Release\Umbraco.Core.xml" />
<DocumentationSource sourceFile="..\src\Umbraco.Web\Umbraco.Web.csproj" />
<DocumentationSource sourceFile="..\src\Umbraco.Web\bin\Release\umbraco.xml" /></DocumentationSources>
<DocumentationSource sourceFile="..\..\src\Umbraco.Core\Umbraco.Core.csproj" />
<DocumentationSource sourceFile="..\..\src\Umbraco.Core\bin\Release\Umbraco.Core.xml" />
<DocumentationSource sourceFile="..\..\src\Umbraco.Web\Umbraco.Web.csproj" />
<DocumentationSource sourceFile="..\..\src\Umbraco.Web\bin\Release\umbraco.xml" /></DocumentationSources>
<WebsiteSdkLinkType>None</WebsiteSdkLinkType>
<HtmlSdkLinkType>None</HtmlSdkLinkType>
<IncludeFavorites>False</IncludeFavorites>

View File

@@ -1,32 +0,0 @@
@ECHO OFF
ECHO Installing Npm NuGet Package
SET nuGetFolder=%CD%\..\src\packages\
ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD%
%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
ECHO Temporarily adding Npm and Node to path
SET oldPath=%PATH%
path=%npmPath%;%nodePath%;%PATH%
SET buildFolder=%CD%
ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
CD %CD%\..\src\Umbraco.Web.UI.Client\
ECHO Do npm install and the grunt build of Belle
call npm install
call npm install -g grunt-cli
call grunt build
ECHO Reset path to what it was before
path=%oldPath%
ECHO Move back to the build folder
CD %buildFolder%

27
build/BuildDocs.ps1 Normal file
View File

@@ -0,0 +1,27 @@
##We cannot continue if sandcastle is not installed determined by env variable: SHFBROOT
if (-not (Test-Path Env:\SHFBROOT))
{
throw "The docs cannot be build, install Sandcastle help file builder"
}
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName
$BuildRoot = Split-Path -Path $PSScriptFilePath -Parent
$OutputPath = Join-Path -Path $BuildRoot -ChildPath "ApiDocs\Output"
$ProjFile = Join-Path -Path $BuildRoot -ChildPath "ApiDocs\csharp-api-docs.shfbproj"
"Building docs with project file: $ProjFile"
$MSBuild = "$Env:SYSTEMROOT\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
# build it!
& $MSBuild "$ProjFile"
# remove files left over
Remove-Item $BuildRoot\* -include csharp-api-docs.shfbproj_*
# copy our custom styles in
Copy-Item $BuildRoot\ApiDocs\TOC.css $OutputPath\TOC.css
""
"Done!"