Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
chore(project): build tweaked, small dep-update
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed Jul 12, 2016
1 parent 645266b commit 4e756a9
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 12 deletions.
7 changes: 5 additions & 2 deletions build/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ gulp.task('fixup-dts', function(){
});

gulp.task('clean-dts', function() {
return gulp.src(paths.output + paths.resources, {read: false, force: true})
.pipe(clean());
return gulp.src([
paths.output + '**/*.d.ts',
'!' + paths.output + '{index,' + paths.packageName + '}.d.ts'
], {read: false})
.pipe(clean({force: true}));
});

gulp.task('build', function(callback) {
Expand Down
11 changes: 11 additions & 0 deletions dist/authFilterValueConverter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export class AuthFilterValueConverter {
/**
* route toView predictator on route.config.auth === isAuthenticated
* @param {RouteConfig} routes the routes array to convert
* @param {Boolean} isAuthenticated authentication status
* @return {Boolean} show/hide element
*/
toView(routes, isAuthenticated) {
return routes.filter(route => typeof route.config.auth !== 'boolean' || route.config.auth === isAuthenticated);
}
}
19 changes: 19 additions & 0 deletions dist/authenticatedFilterValueConverter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {inject} from 'aurelia-dependency-injection';
import {AuthService} from './aurelia-authentication';

@inject(AuthService)
export class AuthenticatedFilterValueConverter {
constructor(authService) {
this.authService = authService;
}

/**
* route toView predictator on route.config.auth === (parameter || authService.isAuthenticated())
* @param {RouteConfig} routes the routes array to convert
* @param {[Boolean]} [isAuthenticated] optional isAuthenticated value. default: this.authService.authenticated
* @return {Boolean} show/hide element
*/
toView(routes, isAuthenticated = this.authService.authenticated) {
return routes.filter(route => typeof route.config.auth !== 'boolean' || route.config.auth === isAuthenticated);
}
}
17 changes: 17 additions & 0 deletions dist/authenticatedValueConverter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {inject} from 'aurelia-dependency-injection';
import {AuthService} from './aurelia-authentication';

@inject(AuthService)
export class AuthenticatedValueConverter {
constructor(authService) {
this.authService = authService;
}

/**
* element toView predictator on authService.isAuthenticated()
* @return {Boolean} show/hide element
*/
toView() {
return this.authService.authenticated;
}
}
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
},
"devDependencies": {
"aurelia-tools": "^0.1.20",
"babel-dts-generator": "^0.5.0",
"babel-eslint": "^4.1.3",
"babel-dts-generator": "^0.6.1",
"babel-eslint": "^6.1.2",
"babel-plugin-syntax-flow": "^6.5.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.6.5",
Expand All @@ -92,16 +92,17 @@
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-stage-1": "^6.5.0",
"body-parser": "^1.14.2",
"body-parser": "^1.15.2",
"conventional-changelog": "0.0.17",
"cors": "^2.7.1",
"del": "^2.2.0",
"express": "^4.13.3",
"express": "^4.14.0",
"gulp": "^3.8.10",
"gulp-babel": "^6.1.2",
"gulp-bump": "^2.0.1",
"gulp-bump": "^2.2.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^1.1.1",
"gulp-eslint": "^3.0.1",
"gulp-insert": "^0.5.0",
"gulp-rename": "^1.2.2",
"gulp-typedoc": "^1.2.1",
Expand All @@ -110,16 +111,16 @@
"karma": "^0.13.15",
"karma-babel-preprocessor": "^6.0.1",
"karma-chrome-launcher": "^0.2.2",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^0.1.7",
"karma-coverage": "^1.1.0",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^0.3.6",
"karma-jspm": "^2.0.2",
"object.assign": "^1.0.3",
"require-dir": "^0.1.0",
"run-sequence": "^1.0.2",
"object.assign": "^4.0.4",
"snyk": "^1.8.4",
"through2": "^2.0.0",
"run-sequence": "^1.2.2",
"vinyl-paths": "^2.1.0",
"yargs": "^4.3.2"
"yargs": "^4.8.0"
}
}

0 comments on commit 4e756a9

Please sign in to comment.