Skip to content

Commit a879df9

Browse files
committed
More cleanup, adjusted settings etc.
1 parent 427bd45 commit a879df9

11 files changed

+193
-49
lines changed

.skybrud/Newtonsoft.Json.dll

508 KB
Binary file not shown.
7 KB
Binary file not shown.

.skybrud/UpdateAssemblyInfoJson.exe

8 KB
Binary file not shown.

Gruntfile.js

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
module.exports = function (grunt) {
2+
3+
var path = require('path');
4+
5+
// Load the package JSON file
6+
var pkg = grunt.file.readJSON('package.json');
7+
8+
// get the root path of the project
9+
var projectRoot = 'src/' + pkg.name + '/';
10+
11+
// Load information about the assembly
12+
var assembly = grunt.file.readJSON(projectRoot + 'Properties/AssemblyInfo.json');
13+
14+
// Get the version of the package
15+
var version = assembly.informationalVersion ? assembly.informationalVersion : assembly.version;
16+
17+
var os = require("os");
18+
var machineName = os.hostname();
19+
20+
console.log(pkg.name);
21+
22+
grunt.initConfig({
23+
pkg: pkg,
24+
clean: {
25+
files: [
26+
'releases/temp/**/*.*'
27+
]
28+
},
29+
copy: {
30+
binary: {
31+
files: [
32+
{
33+
expand: true,
34+
cwd: projectRoot + 'bin/Release',
35+
src: [
36+
pkg.name + '.dll',
37+
pkg.name + '.xml',
38+
'Skybrud.Umbraco.GridData.dll',
39+
'Skybrud.Umbraco.GridData.xml',
40+
'Skybrud.Essentials.dll',
41+
'Skybrud.Essentials.xml',
42+
'Skybrud.LinkPicker.dll',
43+
'Skybrud.LinkPicker.xml'
44+
],
45+
dest: 'releases/temp/bin/'
46+
}
47+
]
48+
},
49+
resources: {
50+
files: [
51+
{
52+
expand: true,
53+
cwd: projectRoot + 'App_Plugins/' + pkg.name + '/',
54+
src: ['**/*.*'],
55+
dest: 'releases/temp/App_Plugins/' + pkg.name + '/'
56+
},
57+
{
58+
expand: true,
59+
cwd: projectRoot + 'App_Plugins/Skybrud.LinkPicker/',
60+
src: ['**/*.*'],
61+
dest: 'releases/temp/App_Plugins/Skybrud.LinkPicker/'
62+
}
63+
]
64+
},
65+
nuget: {
66+
files: [
67+
{
68+
expand: true,
69+
cwd: 'releases/nuget/',
70+
src: [pkg.name + '.' + version + '.nupkg'],
71+
dest: 'D:/NuGet/'
72+
}
73+
]
74+
}
75+
},
76+
nugetpack: {
77+
dist: {
78+
src: 'src/' + pkg.name + '/' + pkg.name + '.csproj',
79+
dest: 'releases/nuget/'
80+
}
81+
},
82+
zip: {
83+
release: {
84+
router: function (filepath) {
85+
var name = path.basename(filepath);
86+
return name == 'LICENSE.html' ? name : filepath.replace('releases/temp/', '');
87+
},
88+
src: [
89+
'releases/temp/**/*.*',
90+
projectRoot + '/LICENSE.html'
91+
],
92+
dest: 'releases/github/' + pkg.name + '.v' + version + '.zip'
93+
}
94+
},
95+
umbracoPackage: {
96+
dist: {
97+
src: 'releases/temp/',
98+
dest: 'releases/umbraco',
99+
options: {
100+
name: pkg.name,
101+
version: version,
102+
url: pkg.url,
103+
license: pkg.license.name,
104+
licenseUrl: pkg.license.url,
105+
author: pkg.author.name,
106+
authorUrl: pkg.author.url,
107+
readme: pkg.readme,
108+
outputName: pkg.name + '.v' + version + '.zip'
109+
}
110+
}
111+
}
112+
});
113+
114+
grunt.loadNpmTasks('grunt-contrib-clean');
115+
grunt.loadNpmTasks('grunt-contrib-copy');
116+
grunt.loadNpmTasks('grunt-nuget');
117+
grunt.loadNpmTasks('grunt-zip');
118+
grunt.loadNpmTasks('grunt-umbraco-package');
119+
120+
grunt.registerTask('dev', ['clean', 'copy:binary', 'copy:resources', 'nugetpack', 'zip', 'umbracoPackage']);
121+
122+
if (machineName == 'abjerner2') {
123+
grunt.registerTask('test', ['clean', 'copy:binary', 'copy:resources', 'nugetpack', 'zip', 'umbracoPackage', 'copy:nuget']);
124+
}
125+
126+
grunt.registerTask('default', ['dev']);
127+
128+
};

LICENSE LICENSE.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Skybrud.dk
3+
Copyright (c) 2016 [Skybrud.dk](http://www.skybrud.dk/)
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so, subject to the following conditions:
1111

1212
The above copyright notice and this permission notice shall be included in all
1313
copies or substantial portions of the Software.
@@ -16,6 +16,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21+
IN THE SOFTWARE.

package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "Skybrud.ImagePicker",
3+
"url": "https://github.com/skybrud/Skybrud.ImagePicker",
4+
"license": {
5+
"name": "MIT",
6+
"url": "https://github.com/skybrud/Skybrud.ImagePicker/blob/master/LICENSE.md"
7+
},
8+
"author": {
9+
"name": "Skybrud.dk",
10+
"url": "http://www.skybrud.dk/"
11+
},
12+
"readme": "Skybrud.ImagePicker contains a property editor and a grid editor for selecting a number of images for use in a slider, gallery or similar.",
13+
"devDependencies": {
14+
"grunt": "~0.4.5",
15+
"grunt-contrib-copy": "~0.4.1",
16+
"grunt-nuget": "~0.1.4",
17+
"grunt-zip": "~0.17.0",
18+
"grunt-umbraco-package": "1.0.0",
19+
"grunt-contrib-clean": "^0.7.0"
20+
}
21+
}

src/Skybrud.ImagePicker/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following
@@ -32,5 +31,6 @@
3231
// You can specify all the values or you can default the Build and Revision Numbers
3332
// by using the '*' as shown below:
3433
// [assembly: AssemblyVersion("1.0.*")]
34+
[assembly: AssemblyInformationalVersion("1.0.0")]
3535
[assembly: AssemblyVersion("1.0.0.0")]
3636
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "Skybrud.ImagePicker",
3+
"description": "Skybrud.ImagePicker contains a property editor and a grid editor for selecting a number of images for use in a slider, gallery or similar.",
4+
"company": "Skybrud.dk",
5+
"product": "Skybrud.ImagePicker",
6+
"copyright": "Copyright © 2016",
7+
"version": "1.0.0.0",
8+
"informationalVersion": "1.0.0",
9+
"fileVersion": "1.0.0.0"
10+
}

src/Skybrud.ImagePicker/Skybrud.ImagePicker.csproj

+7-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProjectGuid>{269235B4-4E01-4F5F-8F09-BCE60AC58FF8}</ProjectGuid>
88
<OutputType>Library</OutputType>
@@ -28,6 +28,7 @@
2828
<DefineConstants>TRACE</DefineConstants>
2929
<ErrorReport>prompt</ErrorReport>
3030
<WarningLevel>4</WarningLevel>
31+
<DocumentationFile>bin\Release\Skybrud.ImagePicker.xml</DocumentationFile>
3132
</PropertyGroup>
3233
<ItemGroup>
3334
<Reference Include="AutoMapper, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -280,10 +281,9 @@
280281
<None Include="app.config" />
281282
<None Include="App_Plugins\Skybrud.ImagePicker\package.manifest" />
282283
<None Include="App_Plugins\Skybrud.ImagePicker\Styles\ImagePicker.less" />
283-
<None Include="App_Plugins\Skybrud.LinkPicker\package.manifest" />
284-
<None Include="App_Plugins\Skybrud.LinkPicker\Styles\LinkPicker.less" />
285-
<None Include="App_Plugins\Skybrud.LinkPicker\Styles\Table.less" />
286284
<None Include="packages.config" />
285+
<None Include="Properties\AssemblyInfo.json" />
286+
<None Include="Skybrud.ImagePicker.nuspec" />
287287
</ItemGroup>
288288
<ItemGroup>
289289
<Content Include="App_Plugins\Skybrud.ImagePicker\Controllers\ImagePickerPreValues.js" />
@@ -299,21 +299,12 @@
299299
<Content Include="App_Plugins\Skybrud.ImagePicker\Views\ImagePickerDirective.html" />
300300
<Content Include="App_Plugins\Skybrud.ImagePicker\Views\ImagePickerGridEditor.html" />
301301
<Content Include="App_Plugins\Skybrud.ImagePicker\Views\ImagePickerPreValues.html" />
302-
<Content Include="App_Plugins\Skybrud.LinkPicker\Controllers\LinkPickerGridEditor.js" />
303-
<Content Include="App_Plugins\Skybrud.LinkPicker\Controllers\LinkPickerPreValues.js" />
304-
<Content Include="App_Plugins\Skybrud.LinkPicker\Directives\LinkPicker.js" />
305-
<Content Include="App_Plugins\Skybrud.LinkPicker\Services\LinkPickerService.js" />
306-
<Content Include="App_Plugins\Skybrud.LinkPicker\Styles\LinkPicker.css" />
307-
<Content Include="App_Plugins\Skybrud.LinkPicker\Styles\LinkPicker.min.css" />
308-
<Content Include="App_Plugins\Skybrud.LinkPicker\Styles\Table.css" />
309-
<Content Include="App_Plugins\Skybrud.LinkPicker\Styles\Table.min.css" />
310-
<Content Include="App_Plugins\Skybrud.LinkPicker\Views\LinkPicker.html" />
311-
<Content Include="App_Plugins\Skybrud.LinkPicker\Views\LinkPickerDirective.html" />
312-
<Content Include="App_Plugins\Skybrud.LinkPicker\Views\LinkPickerGridEditor.html" />
313-
<Content Include="App_Plugins\Skybrud.LinkPicker\Views\LinkPickerPreValues.html" />
314302
</ItemGroup>
315303
<ItemGroup />
316304
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
305+
<PropertyGroup>
306+
<PostBuildEvent>"$(SolutionDir)..\.skybrud\UpdateAssemblyInfoJson.exe" "$(ProjectPath)" "$(TargetPath)"</PostBuildEvent>
307+
</PropertyGroup>
317308
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
318309
Other similar extension points exist, see Microsoft.Common.targets.
319310
<Target Name="BeforeBuild">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>$id$</id>
5+
<version>$version$</version>
6+
<title>$title$</title>
7+
<authors>Anders Bjerner, René Pjengaard</authors>
8+
<owners>Anders Bjerner, René Pjengaard</owners>
9+
<licenseUrl>https://github.com/skybrud/Skybrud.ImagePicker/blob/master/LICENSE.md</licenseUrl>
10+
<projectUrl>https://github.com/skybrud/Skybrud.ImagePicker</projectUrl>
11+
<iconUrl>http://www.skybrud.dk/img/5431sk/icon/favicon.ico</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>$description$</description>
14+
<tags>Skybrud, Umbraco, Images, Picker</tags>
15+
</metadata>
16+
</package>

src/Skybrud.ImagePicker/Skybrud.ImagePicker.sln

-22
This file was deleted.

0 commit comments

Comments
 (0)