Skip to content

Commit 851be23

Browse files
committed
New build system and release
1 parent 501c5b5 commit 851be23

6 files changed

Lines changed: 272 additions & 51 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ _References
161161
_Development
162162
_BuildSupport
163163
_Packages
164+
node_modules

FlickrGallery.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@
7676
<Reference Include="System.Data" />
7777
<Reference Include="System.ComponentModel.DataAnnotations" />
7878
<Reference Include="System.Data.DataSetExtensions" />
79-
<Reference Include="System.Net.Http, Version=4.0.30319.33440 built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79+
<Reference Include="System.Net.Http, Version=4.6.1038.0 built by: NETFXREL2 built by: NETFXREL2 built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL built by: FX45W81RTMREL, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
8080
<SpecificVersion>False</SpecificVersion>
8181
<HintPath>_References\System.Net.Http.dll</HintPath>
82+
<Private>False</Private>
8283
</Reference>
8384
<Reference Include="System.Net.Http.Formatting, Version=5.2.30128.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8485
<SpecificVersion>False</SpecificVersion>

Properties/AssemblyInfo.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// General Information about an assembly is controlled through the following
55
// set of attributes. Change these attribute values to modify the information
66
// associated with an assembly.
7-
[assembly: AssemblyTitle("FlickrGallery")]
8-
[assembly: AssemblyDescription("")]
7+
[assembly: AssemblyTitle("Flickr Gallery")]
8+
[assembly: AssemblyDescription("Flickr Gallery module for DNN Platform")]
99
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("DNN Connect Association")]
10+
[assembly: AssemblyCompany("DNN Connect")]
1111
[assembly: AssemblyProduct("FlickrGallery")]
12-
[assembly: AssemblyCopyright("Copyright © 2015")]
12+
[assembly: AssemblyCopyright("Copyright 2016 by DNN Connect")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]
1515

@@ -30,7 +30,7 @@
3030
//
3131
// You can specify all the values or you can default the Revision and Build Numbers
3232
// by using the '*' as shown below:
33-
[assembly: AssemblyVersion("02.00.00")]
34-
[assembly: AssemblyFileVersion("02.00.00")]
33+
[assembly: AssemblyVersion("2.1.0")]
34+
[assembly: AssemblyFileVersion("2.1.0")]
3535

36-
[assembly: AssemblyInformationalVersion("02.00.00")]
36+
[assembly: AssemblyInformationalVersion("02.01.00")]

gulpfile.js

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
var gulp = require('gulp'),
2+
msbuild = require('gulp-msbuild'),
3+
browserify = require('gulp-browserify'),
4+
minifyCss = require('gulp-minify-css'),
5+
uglify = require('gulp-uglify'),
6+
assemblyInfo = require('gulp-dotnet-assembly-info'),
7+
plumber = require('gulp-plumber'),
8+
config = require('./package.json'),
9+
zip = require('gulp-zip'),
10+
filter = require('gulp-filter'),
11+
merge = require('merge2'),
12+
gutil = require('gulp-util'),
13+
markdown = require('gulp-markdown'),
14+
rename = require('gulp-rename'),
15+
manifest = require('gulp-dnn-manifest'),
16+
path = require('path'),
17+
concat = require('gulp-concat'),
18+
less = require('gulp-less'),
19+
lessPluginCleanCSS = require('less-plugin-clean-css'),
20+
cleancss = new lessPluginCleanCSS({
21+
advanced: true
22+
});
23+
24+
gulp.task('less', function() {
25+
return gulp.src('css/src/less/module.less')
26+
.pipe(less({
27+
paths: [path.join(__dirname, 'less', 'includes')],
28+
plugins: [cleancss]
29+
}))
30+
.pipe(gulp.dest('.'));
31+
});
32+
33+
gulp.task('css', ['less'], function() {
34+
return gulp.src('css/src/module.css')
35+
.pipe(gulp.dest('.'));
36+
});
37+
38+
gulp.task('watch', function() {
39+
gulp.watch('css/src/**/*.less', ['css']);
40+
});
41+
42+
gulp.task('assemblyInfo', function() {
43+
return gulp
44+
.src('**/AssemblyInfo.cs')
45+
.pipe(assemblyInfo({
46+
title: config.dnnModule.friendlyName,
47+
description: config.description,
48+
version: config.version,
49+
fileVersion: config.version,
50+
company: config.dnnModule.owner.organization,
51+
copyright: function(value) {
52+
return 'Copyright ' + new Date().getFullYear() + ' by ' + config.dnnModule.owner.organization;
53+
}
54+
}))
55+
.pipe(gulp.dest('.'));
56+
});
57+
58+
gulp.task('build', ['assemblyInfo'], function() {
59+
return gulp.src('./FlickrGallery.csproj')
60+
.pipe(msbuild({
61+
toolsVersion: 14.0,
62+
targets: ['Clean', 'Build'],
63+
errorOnFail: true,
64+
stdout: true,
65+
properties: {
66+
Configuration: 'Release',
67+
OutputPath: config.dnnModule.pathToAssemblies
68+
}
69+
}));
70+
});
71+
72+
gulp.task('packageInstall', ['build'], function() {
73+
var packageName = config.dnnModule.fullName + '_' + config.version;
74+
var dirFilter = filter(fileTest);
75+
return merge(
76+
merge(
77+
gulp.src([
78+
'App_LocalResources/*.resx',
79+
'*.ascx',
80+
'Views/**/*.cshtml',
81+
'fonts/*.*'
82+
], {
83+
base: '.'
84+
}),
85+
gulp.src([
86+
'**/*.html'
87+
], {
88+
base: '.'
89+
})
90+
.pipe(dirFilter),
91+
gulp.src([
92+
'css/*.png',
93+
'css/*.gif',
94+
'css/*.svg'
95+
], {
96+
base: '.'
97+
}),
98+
gulp.src([
99+
'*.png'
100+
], {
101+
base: '.'
102+
}),
103+
gulp.src([
104+
'**/*.txt'
105+
], {
106+
base: '.'
107+
})
108+
.pipe(dirFilter),
109+
gulp.src(['*.css', 'css/*.css'], {
110+
base: '.'
111+
})
112+
.pipe(minifyCss())
113+
.pipe(dirFilter),
114+
gulp.src(['js/*.js', '!js/*.min.js'], {
115+
base: '.'
116+
})
117+
.pipe(uglify().on('error', gutil.log)),
118+
gulp.src(['js/*.min.js'], {
119+
base: '.'
120+
})
121+
)
122+
.pipe(zip('Resources.zip')),
123+
gulp.src(config.dnnModule.pathToSupplementaryFiles + '/*.dnn')
124+
.pipe(manifest(config)),
125+
gulp.src([config.dnnModule.pathToAssemblies + '/*.dll',
126+
config.dnnModule.pathToScripts + '/*.SqlDataProvider',
127+
config.dnnModule.pathToSupplementaryFiles + '/License.txt',
128+
config.dnnModule.pathToSupplementaryFiles + '/ReleaseNotes.txt'
129+
]),
130+
gulp.src(config.dnnModule.pathToSupplementaryFiles + '/ReleaseNotes.md')
131+
.pipe(markdown())
132+
.pipe(rename('ReleaseNotes.txt'))
133+
)
134+
.pipe(zip(packageName + '_Install.zip'))
135+
.pipe(gulp.dest(config.dnnModule.packagesPath));
136+
});
137+
138+
gulp.task('packageSource', ['build'], function() {
139+
var packageName = config.dnnModule.fullName + '_' + config.version;
140+
var dirFilter = filter(fileTest);
141+
return merge(
142+
gulp.src(['**/*.html',
143+
'**/*.png',
144+
'**/*.gif',
145+
'**/*.css',
146+
'js/**/*.js',
147+
'**/*.??proj',
148+
'**/*.sln',
149+
'**/*.json',
150+
'**/*.cs',
151+
'**/*.vb',
152+
'**/*.resx',
153+
'**/*.ascx',
154+
'**/*.cshtml',
155+
'**/*.less',
156+
'fonts/*.*',
157+
config.dnnModule.pathToSupplementaryFiles + '**/*.*'
158+
], {
159+
base: '.'
160+
})
161+
.pipe(dirFilter)
162+
.pipe(zip('Resources.zip')),
163+
gulp.src(config.dnnModule.pathToSupplementaryFiles + '/*.dnn')
164+
.pipe(manifest(config)),
165+
gulp.src([config.dnnModule.pathToAssemblies + '/*.dll',
166+
config.dnnModule.pathToScripts + '/*.SqlDataProvider',
167+
config.dnnModule.pathToSupplementaryFiles + '/License.txt',
168+
config.dnnModule.pathToSupplementaryFiles + '/ReleaseNotes.txt'
169+
])
170+
)
171+
.pipe(zip(packageName + '_Source.zip'))
172+
.pipe(gulp.dest(config.dnnModule.packagesPath));
173+
})
174+
175+
gulp.task('package', ['packageInstall', 'packageSource'], function() {
176+
return null;
177+
})
178+
179+
function fileTest(file) {
180+
var res = false;
181+
for (var i = config.dnnModule.excludeFilter.length - 1; i >= 0; i--) {
182+
res = res | file.relative.startsWith(config.dnnModule.excludeFilter[i]) | file.relative.indexOf('/obj/') > -1;
183+
};
184+
return !res;
185+
}
186+
187+
function startsWith(str, strToSearch) {
188+
return str.indexOf(strToSearch) === 0;
189+
}

module.css

Lines changed: 1 addition & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "flickrgallery",
3+
"version": "2.1.0",
4+
"description": "Flickr Gallery module for DNN Platform",
5+
"dnnModule": {
6+
"fullName": "Connect_FlickrGallery",
7+
"friendlyName": "Flickr Gallery",
8+
"packageName": "FlickrGallery",
9+
"owner": {
10+
"name": "Peter Donker",
11+
"organization": "DNN Connect",
12+
"url": "http://dnn-connect.org",
13+
"email": "peter@bring2mind.net"
14+
},
15+
"module": {
16+
"packageName": "Connect_FlickrGallery",
17+
"folderName": "Connect/FlickrGallery",
18+
"azureCompatible": "true",
19+
"iconFile": "DesktopModules\\Connect\\FlickrGallery\\FlickrGallery.png"
20+
},
21+
"tempPath": "./package",
22+
"packagesPath": "./_Packages",
23+
"pathToAssemblies": "./bin",
24+
"pathToScripts": "./_Installation/SQL2005",
25+
"pathToSupplementaryFiles": "./_Installation",
26+
"excludeFilter": [
27+
"_Development",
28+
"bower_components",
29+
"node_modules",
30+
"bin",
31+
"obj",
32+
"_Packages",
33+
"_Installation"
34+
]
35+
},
36+
"main": "index.js",
37+
"scripts": {
38+
"test": "echo \"Error: no test specified\" && exit 1"
39+
},
40+
"repository": {
41+
"type": "git",
42+
"url": "git+https://github.com/DNN-Connect/FlickrGallery.git"
43+
},
44+
"author": "Peter Donker <peter@bring2mind.net> (http://www.bring2mind.net)",
45+
"license": "MIT",
46+
"bugs": {
47+
"url": "https://github.com/DNN-Connect/FlickrGallery/issues"
48+
},
49+
"homepage": "https://github.com/DNN-Connect/FlickrGallery#readme",
50+
"devDependencies": {
51+
"browserify": "^12.0.1",
52+
"gulp": "^3.9.0",
53+
"gulp-browserify": "^0.5.1",
54+
"gulp-concat": "^2.6.0",
55+
"gulp-dnn-manifest": "^0.1.0",
56+
"gulp-dotnet-assembly-info": "^0.1.11",
57+
"gulp-filter": "^3.0.1",
58+
"gulp-less": "^3.0.4",
59+
"gulp-markdown": "^1.1.0",
60+
"gulp-minify-css": "^1.2.1",
61+
"gulp-msbuild": "^0.2.13",
62+
"gulp-plumber": "^1.0.1",
63+
"gulp-react": "^3.0.1",
64+
"gulp-rename": "^1.2.2",
65+
"gulp-uglify": "^1.5.1",
66+
"gulp-util": "^3.0.6",
67+
"gulp-zip": "^3.0.2",
68+
"less-plugin-clean-css": "^1.5.1",
69+
"merge2": "^0.3.6",
70+
"path": "^0.12.7"
71+
}
72+
}

0 commit comments

Comments
 (0)