Compare commits

..

2 Commits

Author SHA1 Message Date
elitsa 1a54cdb583 Functions for the API docs are refactored 2019-05-15 13:54:35 +02:00
elitsa d580153c9a Removing build-docs.ps1 script since it is integrated now in the build.ps1 2019-05-15 13:51:07 +02:00
6 changed files with 29 additions and 83 deletions
-2
View File
@@ -39,8 +39,6 @@
<dependency id="Serilog.Formatting.Compact.Reader" version="[1.0.3,1.999999)" />
<dependency id="Serilog.Settings.AppSettings" version="[2.2.2,2.999999)" />
<dependency id="Serilog.Sinks.File" version="[4.0.0,4.999999)" />
<dependency id="Serilog.Sinks.Map" version="[1.0.0,1.999999)" />
<dependency id="Serilog.Sinks.Async" version="[1.3.0,1.999999)" />
<dependency id="Umbraco.SqlServerCE" version="[4.0.0.1,4.999999)" />
<dependency id="NPoco" version="[3.9.4,3.999999)" />
</group>
-44
View File
@@ -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
View File
@@ -430,19 +430,16 @@
$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"
$tmp = $this.BuildTemp
$out = $this.BuildOutput
$tmp = $this.BuildTemp
$out = $this.BuildOutput
$DocFxJson = Join-Path -Path $src "\ApiDocs\docfx.json"
$DocFxSiteOutput = Join-Path -Path $tmp "\_site\*.*"
#restore nuget packages
$this.RestoreNuGet()
# run DocFx
$DocFx = $this.BuildEnv.DocFx
@@ -453,24 +450,26 @@
& $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"
$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"
cd .\src\Umbraco.Web.UI.Client
Push-Location "$src\Umbraco.Web.UI.Client"
"Generating the docs and waiting before executing the next commands"
& gulp docs | Out-Null
Pop-Location
# change baseUrl
$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
# zip it
+4 -11
View File
@@ -29,7 +29,6 @@ using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.Testing.Objects.Accessors;
using Umbraco.Web;
using Umbraco.Web.Cache;
using Umbraco.Web.Macros;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Runtime;
@@ -82,7 +81,7 @@ namespace Umbraco.Tests.Runtimes
var composerTypes = typeLoader.GetTypes<IComposer>() // all of them
.Where(x => !x.FullName.StartsWith("Umbraco.Tests.")) // exclude test components
.Where(x => x != typeof(WebInitialComposer) && x != typeof(WebFinalComposer)); // exclude web runtime
.Where(x => x != typeof(WebInitialComposer)); // exclude web runtime
var composers = new Composers(composition, composerTypes, profilingLogger);
composers.Compose();
@@ -102,8 +101,6 @@ namespace Umbraco.Tests.Runtimes
composition.RegisterUnique<IDistributedCacheBinder, DistributedCacheBinder>();
composition.RegisterUnique<IExamineManager>(f => ExamineManager.Instance);
composition.RegisterUnique<IUmbracoContextFactory, UmbracoContextFactory>();
composition.RegisterUnique<IMacroRenderer, MacroRenderer>();
composition.RegisterUnique<MediaUrlProviderCollection>(_ => new MediaUrlProviderCollection(Enumerable.Empty<IMediaUrlProvider>()));
// initialize some components only/individually
composition.WithCollectionBuilder<ComponentCollectionBuilder>()
@@ -127,15 +124,14 @@ namespace Umbraco.Tests.Runtimes
if (true || runtimeState.Level == RuntimeLevel.Install)
{
var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var file = databaseFactory.Configured ? Path.Combine(path, "UmbracoNPocoTests.sdf") : Path.Combine(path, "Umbraco.sdf");
var file = Path.Combine(path, "Umbraco.sdf");
if (File.Exists(file))
File.Delete(file);
// create the database file
// databaseBuilder.ConfigureEmbeddedDatabaseConnection() can do it too,
// but then it wants to write the connection string to web.config = bad
var connectionString = databaseFactory.Configured ? databaseFactory.ConnectionString : "Data Source=|DataDirectory|\\Umbraco.sdf;Flush Interval=1;";
using (var engine = new SqlCeEngine(connectionString))
using (var engine = new SqlCeEngine("Data Source=|DataDirectory|\\Umbraco.sdf;Flush Interval=1;"))
{
engine.CreateDatabase();
}
@@ -144,8 +140,7 @@ namespace Umbraco.Tests.Runtimes
//databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
//databaseBuilder.CreateDatabaseSchemaAndData();
if (!databaseFactory.Configured)
databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
databaseFactory.Configure(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
var scopeProvider = factory.GetInstance<IScopeProvider>();
using (var scope = scopeProvider.CreateScope())
@@ -159,8 +154,6 @@ namespace Umbraco.Tests.Runtimes
// done installing
runtimeState.Level = RuntimeLevel.Run;
components.Initialize();
// instantiate to register events
// should be done by Initialize?
// should we invoke Initialize?
@@ -61,9 +61,9 @@ function clipboardService(notificationsService, eventsService, localStorageServi
* @name umbraco.services.clipboardService#copy
* @methodOf umbraco.services.clipboardService
*
* @param {string} type A string defining the type of data to storing, example: 'elementType', 'contentNode'
* @param {string} alias A string defining the alias of the data to store, example: 'product'
* @param {object} data A object containing the properties to be saved.
* @param type {string} umbraco A string defining the type of data to storing, example: 'elementType', 'contentNode'
* @param alias {string} umbraco A string defining the alias of the data to store, example: 'product'
* @param data {object} umbraco A object containing the properties to be saved.
*
* @description
* Saves a single JS-object with a type and alias to the clipboard.
@@ -114,8 +114,8 @@ function clipboardService(notificationsService, eventsService, localStorageServi
* @name umbraco.services.supportsCopy#hasEntriesOfType
* @methodOf umbraco.services.clipboardService
*
* @param {string} type A string defining the type of data test for.
* @param {string} aliases A array of strings providing the alias of the data you want to test for.
* @param type {string} umbraco A string defining the type of data test for.
* @param aliases {string} umbraco A array of strings providing the alias of the data you want to test for.
*
* @description
* Determines whether the current clipboard has entries that match a given type and one of the aliases.
@@ -134,8 +134,8 @@ function clipboardService(notificationsService, eventsService, localStorageServi
* @name umbraco.services.supportsCopy#retriveEntriesOfType
* @methodOf umbraco.services.clipboardService
*
* @param {string} type A string defining the type of data to recive.
* @param {string} aliases A array of strings providing the alias of the data you want to recive.
* @param type {string} umbraco A string defining the type of data to recive.
* @param aliases {string} umbraco A array of strings providing the alias of the data you want to recive.
*
* @description
* Returns an array of entries matching the given type and one of the provided aliases.
@@ -159,8 +159,8 @@ function clipboardService(notificationsService, eventsService, localStorageServi
* @name umbraco.services.supportsCopy#retriveEntriesOfType
* @methodOf umbraco.services.clipboardService
*
* @param {string} type A string defining the type of data to recive.
* @param {string} aliases A array of strings providing the alias of the data you want to recive.
* @param type {string} umbraco A string defining the type of data to recive.
* @param aliases {string} umbraco A array of strings providing the alias of the data you want to recive.
*
* @description
* Returns an array of data of entries matching the given type and one of the provided aliases.
@@ -174,8 +174,8 @@ function clipboardService(notificationsService, eventsService, localStorageServi
* @name umbraco.services.supportsCopy#retriveEntriesOfType
* @methodOf umbraco.services.clipboardService
*
* @param {string} type A string defining the type of data to remove.
* @param {string} aliases A array of strings providing the alias of the data you want to remove.
* @param type {string} umbraco A string defining the type of data to remove.
* @param aliases {string} umbraco A array of strings providing the alias of the data you want to remove.
*
* @description
* Removes entries matching the given type and one of the provided aliases.
@@ -30,7 +30,7 @@
</li>
</ul>
<div class="umb-overlay__section-header" ng-if="model.pasteItems.length > 0 && (model.availableItems | filter:searchTerm).length > 0">
<div class="umb-overlay__section-header" ng-if="::(model.pasteItems | filter:searchTerm).length > 0">
<h5><localize key="content_createEmpty">Create new</localize></h5>
</div>