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

Commit b94c82c

Browse files
committed
Merge pull request #45 from Jeavon/feature/nuget
Re-enable NuGet package generation
2 parents 56ecab3 + 6e33577 commit b94c82c

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

build/install.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
param($installPath, $toolsPath, $package, $project)
2+
3+
$appPluginsFolder = $project.ProjectItems | Where-Object { $_.Name -eq "App_Plugins" }
4+
$docTypeGridEditorFolder = $appPluginsFolder.ProjectItems | Where-Object { $_.Name -eq "DocTypeGridEditor" }
5+
6+
if (!$docTypeGridEditorFolder)
7+
{
8+
$newPackageFiles = "$installPath\Content\App_Plugins\DocTypeGridEditor"
9+
10+
$projFile = Get-Item ($project.FullName)
11+
$projDirectory = $projFile.DirectoryName
12+
$projectPath = Join-Path $projDirectory -ChildPath "App_Plugins"
13+
$projectPathExists = Test-Path $projectPath
14+
15+
if ($projectPathExists) {
16+
Write-Host "Updating Nested Content App_Plugin files using PS as they have been excluded from the project"
17+
Copy-Item $newPackageFiles $projectPath -Recurse -Force
18+
}
19+
}

build/package.proj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
<PluginFiles Include="$(CoreProjectDir)\Web\UI\**\*.*" />
124124
<PackageFile Include="$(MSBuildProjectDirectory)\package.xml" />
125125
<NuSpecFile Include="$(MSBuildProjectDirectory)\package.nuspec" />
126+
<NugetReadme Include="$(MSBuildProjectDirectory)\Readme.txt" />
127+
<InstallPsFile Include="$(MSBuildProjectDirectory)\install.ps1" />
126128
</ItemGroup>
127129
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BuildUmbDir)\bin" />
128130
<Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildUmbDir)" />
@@ -132,6 +134,8 @@
132134
<Copy SourceFiles="@(PluginFiles)" DestinationFiles="@(PluginFiles->'$(BuildNuGetDir)\Content\%(RecursiveDir)%(Filename)%(Extension)')" />
133135
<Copy SourceFiles="@(SrcFiles)" DestinationFiles="@(SrcFiles->'$(BuildNuGetDir)\src\%(RecursiveDir)%(Filename)%(Extension)')" />
134136
<Copy SourceFiles="@(NuSpecFile)" DestinationFolder="$(BuildNuGetDir)" />
137+
<Copy SourceFiles="@(NugetReadme)" DestinationFolder="$(BuildNuGetDir)" />
138+
<Copy SourceFiles="@(InstallPsFile)" DestinationFolder="$(BuildNuGetDir)\tools" />
135139
</Target>
136140

137141
<!-- MANIFEST UMBRACO -->
@@ -191,12 +195,12 @@
191195
OutputDirectory="$(ArtifactsDir)"
192196
Files="@(PackageFiles)" />
193197

194-
<!--<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\.nuget\NuGet.exe"
198+
<MSBuild.NuGet.Tasks.Pack NuGetExePath="$(RootDir)\src\.nuget\NuGet.exe"
195199
ManifestFile="$(BuildNuGetDir)\package.nuspec"
196200
BasePath="$(BuildNuGetDir)"
197201
Version="$(ProductVersion)"
198202
OutputDirectory="$(ArtifactsDir)"
199-
Symbols="true" />-->
203+
Symbols="true" />
200204

201205
<RemoveDir Directories="$(BuildUmbDir)" Condition="Exists('$(BuildUmbDir)')" />
202206
<RemoveDir Directories="$(BuildNuGetDir)" Condition="Exists('$(BuildNuGetDir)')" />

build/readme.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
____ _____ ____ _ _ _____ _ _ _
2+
| _ \ ___ __|_ _| _ _ __ ___ / ___|_ __(_) __| | ____|__| (_) |_ ___ _ __
3+
| | | |/ _ \ / __|| || | | | '_ \ / _ \ | _| '__| |/ _` | _| / _` | | __/ _ \| '__|
4+
| |_| | (_) | (__ | || |_| | |_) | __/ |_| | | | | (_| | |__| (_| | | || (_) | |
5+
|____/ \___/ \___||_| \__, | .__/ \___|\____|_| |_|\__,_|_____\__,_|_|\__\___/|_|
6+
|___/|_|
7+
8+
--------------------------------------------------------------------------------------
9+
10+
To enable DocTypeGridEditor you must add the following JSON snippet to grid.editors.config.js found in the Config folder
11+
12+
{
13+
"name": "Doc Type",
14+
"alias": "docType",
15+
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
16+
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
17+
"icon": "icon-item-arrangement",
18+
"config": {
19+
"allowedDocTypes": [],
20+
"nameTemplate": "",
21+
"enablePreview": true,
22+
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
23+
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
24+
"previewCssFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Css/dtge.css",
25+
"previewJsFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Js/dtge.js"
26+
}
27+
}

src/Our.Umbraco.DocTypeGridEditor.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Package", "Build Pack
2222
..\appveyor.yml = ..\appveyor.yml
2323
..\build-appveyor.cmd = ..\build-appveyor.cmd
2424
..\build.cmd = ..\build.cmd
25+
..\build\install.ps1 = ..\build\install.ps1
2526
..\build\package.nuspec = ..\build\package.nuspec
2627
..\build\package.proj = ..\build\package.proj
2728
..\build\package.xml = ..\build\package.xml
29+
..\build\readme.txt = ..\build\readme.txt
2830
EndProjectSection
2931
EndProject
3032
Global

0 commit comments

Comments
 (0)