Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Re-enable NuGet package generation #45

Merged
merged 1 commit into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions build/install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
param($installPath, $toolsPath, $package, $project)

$appPluginsFolder = $project.ProjectItems | Where-Object { $_.Name -eq "App_Plugins" }
$docTypeGridEditorFolder = $appPluginsFolder.ProjectItems | Where-Object { $_.Name -eq "DocTypeGridEditor" }

if (!$docTypeGridEditorFolder)
{
$newPackageFiles = "$installPath\Content\App_Plugins\DocTypeGridEditor"

$projFile = Get-Item ($project.FullName)
$projDirectory = $projFile.DirectoryName
$projectPath = Join-Path $projDirectory -ChildPath "App_Plugins"
$projectPathExists = Test-Path $projectPath

if ($projectPathExists) {
Write-Host "Updating Nested Content App_Plugin files using PS as they have been excluded from the project"
Copy-Item $newPackageFiles $projectPath -Recurse -Force
}
}
8 changes: 6 additions & 2 deletions build/package.proj
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
<PluginFiles Include="$(CoreProjectDir)\Web\UI\**\*.*" />
<PackageFile Include="$(MSBuildProjectDirectory)\package.xml" />
<NuSpecFile Include="$(MSBuildProjectDirectory)\package.nuspec" />
<NugetReadme Include="$(MSBuildProjectDirectory)\Readme.txt" />
<InstallPsFile Include="$(MSBuildProjectDirectory)\install.ps1" />
</ItemGroup>
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BuildUmbDir)\bin" />
<Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildUmbDir)" />
Expand All @@ -132,6 +134,8 @@
<Copy SourceFiles="@(PluginFiles)" DestinationFiles="@(PluginFiles->'$(BuildNuGetDir)\Content\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SrcFiles)" DestinationFiles="@(SrcFiles->'$(BuildNuGetDir)\src\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(NuSpecFile)" DestinationFolder="$(BuildNuGetDir)" />
<Copy SourceFiles="@(NugetReadme)" DestinationFolder="$(BuildNuGetDir)" />
<Copy SourceFiles="@(InstallPsFile)" DestinationFolder="$(BuildNuGetDir)\tools" />
</Target>

<!-- MANIFEST UMBRACO -->
Expand Down Expand Up @@ -191,12 +195,12 @@
OutputDirectory="$(ArtifactsDir)"
Files="@(PackageFiles)" />

<!--<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\.nuget\NuGet.exe"
<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\.nuget\NuGet.exe"
ManifestFile="$(BuildNuGetDir)\package.nuspec"
BasePath="$(BuildNuGetDir)"
Version="$(ProductVersion)"
OutputDirectory="$(ArtifactsDir)"
Symbols="true" />-->
Symbols="true" />

<RemoveDir Directories="$(BuildUmbDir)" Condition="Exists('$(BuildUmbDir)')" />
<RemoveDir Directories="$(BuildNuGetDir)" Condition="Exists('$(BuildNuGetDir)')" />
Expand Down
27 changes: 27 additions & 0 deletions build/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
____ _____ ____ _ _ _____ _ _ _
| _ \ ___ __|_ _| _ _ __ ___ / ___|_ __(_) __| | ____|__| (_) |_ ___ _ __
| | | |/ _ \ / __|| || | | | '_ \ / _ \ | _| '__| |/ _` | _| / _` | | __/ _ \| '__|
| |_| | (_) | (__ | || |_| | |_) | __/ |_| | | | | (_| | |__| (_| | | || (_) | |
|____/ \___/ \___||_| \__, | .__/ \___|\____|_| |_|\__,_|_____\__,_|_|\__\___/|_|
|___/|_|

--------------------------------------------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving the ASCII art, thanks @Jeavon 😎

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obligatory for NuGet readme ❗


To enable DocTypeGridEditor you must add the following JSON snippet to grid.editors.config.js found in the Config folder

{
"name": "Doc Type",
"alias": "docType",
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
"icon": "icon-item-arrangement",
"config": {
"allowedDocTypes": [],
"nameTemplate": "",
"enablePreview": true,
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
"previewCssFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Css/dtge.css",
"previewJsFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Js/dtge.js"
}
}
2 changes: 2 additions & 0 deletions src/Our.Umbraco.DocTypeGridEditor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Package", "Build Pack
..\appveyor.yml = ..\appveyor.yml
..\build-appveyor.cmd = ..\build-appveyor.cmd
..\build.cmd = ..\build.cmd
..\build\install.ps1 = ..\build\install.ps1
..\build\package.nuspec = ..\build\package.nuspec
..\build\package.proj = ..\build\package.proj
..\build\package.xml = ..\build\package.xml
..\build\readme.txt = ..\build\readme.txt
EndProjectSection
EndProject
Global
Expand Down