Skip to content

Commit

Permalink
0.61.2
Browse files Browse the repository at this point in the history
This closes #79
  • Loading branch information
coni2k authored Jun 24, 2016
1 parent 39b9602 commit bc92424
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Changelog

**0.61.2**

* ngClient - appSettings.js doesn't get copied from 'Setup' folder bug fix
https://github.com/forCrowd/WealthEconomy/issues/79

**0.61.1**

* Contributors page fix
Expand Down
2 changes: 1 addition & 1 deletion SolutionItems/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
//
// AssemblyFileVersion is not in use for the moment
//
[assembly: AssemblyVersion("0.61.1")]
[assembly: AssemblyVersion("0.61.2")]
[assembly: AssemblyFileVersion("1.0.0.0")]
36 changes: 31 additions & 5 deletions ngClient/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var gulp = require('gulp'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
cssmin = require('gulp-cssmin'),
fs = require('fs'),
jshint = require('gulp-jshint'),
rename = require('gulp-rename'),
sourcemaps = require('gulp-sourcemaps'),
Expand All @@ -16,13 +17,21 @@ var appMinJs = 'app.min.js',
appJs = appMinJs.replace('.min', ''),
appJsRoot = './_system/js/app',
appJsSourceMapRoot = appJsRoot.substring(1),
appJsSrc = [appJsRoot + '/**/*.js', '!' + appJsRoot + '/' + appJs, '!' + appJsRoot + '/' + appMinJs];
appJsSrc = [appJsRoot + '/**/*.js',
'!' + appJsRoot + '/' + appJs,
'!' + appJsRoot + '/' + appMinJs];

// app.css variables
var appMinCss = 'app.min.css',
appCss = appMinCss.replace('.min', ''),
appCssRoot = './_system/css',
appCssSrc = [appCssRoot + '/*.css', appJsRoot + '/directives/**/*.css', '!' + appCssRoot + '/' + appCss, '!' + appCssRoot + '/' + appMinCss];
appCssSrc = [appCssRoot + '/*.css',
appJsRoot + '/directives/**/*.css',
'!' + appCssRoot + '/' + appCss,
'!' + appCssRoot + '/' + appMinCss];

// appSettings.js variables
var appSettingsJs = 'appSettings.js';

// lib variables
var libJsSrcRoot = './node_modules',
Expand Down Expand Up @@ -77,7 +86,7 @@ var fontsSrc = [
fontsDest = './_system/css/fonts';

// default
gulp.task('default', [appJs, appCss, libJs, libCss, 'watch']);
gulp.task('default', [appJs, appCss, appSettingsJs, libJs, libCss, 'watch']);

// app.js: jshhint + concat all into app.js + minify all into app.min.js
gulp.task(appJs, function () {
Expand Down Expand Up @@ -106,6 +115,24 @@ gulp.task(appCss, function () {
.pipe(gulp.dest(appCssRoot));
});

// appSettings.js: if it doesn't exist, copy '/appSettings/Setup/appSettings.js' file to '/appSettings' folder
gulp.task(appSettingsJs, function () {

var appSettingsRoot = './_system/js/appSettings';

fs.stat(appSettingsRoot + '/' + appSettingsJs, function (err, stat) {

// If there is no error, it means file is already there. No need to copy from setup, move along!
if (err === null) {
return;
}

return gulp.src(appSettingsRoot + '/Setup/' + appSettingsJs)
.pipe(gulp.dest(appSettingsRoot));
});

});

// lib.js: jshhint + concat all into lib.js + minify all into lib.min.js
gulp.task(libJs, function () {

Expand All @@ -117,8 +144,7 @@ gulp.task(libJs, function () {
.pipe(uglify())
.on('error', errorHandler)
.pipe(sourcemaps.write('./', { sourceRoot: libJsSourceMapRoot }))
.pipe(gulp.dest(libJsDest))
;
.pipe(gulp.dest(libJsDest));
});

// lib.css: copy font awesome fonts + concat all into lib.css + minify all into lib.min.css
Expand Down
9 changes: 0 additions & 9 deletions ngClient/ngClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,4 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="BeforeBuild">
<CreateItem Include="$(ProjectDir)_system\js\appSettings\*.js">
<Output TaskParameter="Include" ItemName="ExistingFiles" />
</CreateItem>
<CreateItem Include="$(ProjectDir)_system\js\appSettings\Setup\*.js" Exclude="@(ExistingFiles -> '$(ProjectDir)_system\js\appSettings\Setup\%(FileName)%(Extension)')">
<Output TaskParameter="Include" ItemName="NewFiles" />
</CreateItem>
<Copy SourceFiles="@(NewFiles)" DestinationFolder="$(ProjectDir)_system\js\appSettings" />
</Target>
</Project>
1 change: 1 addition & 0 deletions ngClient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"devDependencies": {
"brace-expansion": "^1.1.5",
"fs": "^0.0.2",
"gulp": "^3.9.1",
"gulp-clean": "^0.3.1",
"gulp-concat": "^2.6.0",
Expand Down

0 comments on commit bc92424

Please sign in to comment.