Skip to content

Commit

Permalink
debugging messages fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mickelindahl committed Jun 5, 2017
1 parent 87d91d8 commit 4fb3490
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const fs = require( 'fs' );
const path = require( 'path' );
const Promise = require( 'bluebird' );
const handlebars = require( 'handlebars' );
const debug = require( 'debug' )( 'hapi_orchestra_view:lib:test:index.js' )
const debug = require( 'debug' )( 'hapi_orchestra_view:lib:index.js' )

let _options;

/**@module server.methods.handler */

let _evokeCallbacks = ( request, options ) => {

debug('_evokeCallbacks',options.callbacks)
debug('_evokeCallbacks')

let promise = Promise.resolve();

Expand All @@ -28,8 +28,6 @@ let _evokeCallbacks = ( request, options ) => {

options.callbacks.forEach( call => {

debug('_evokeCallbacks', call)

promise = promise.then( () => {

return new Promise( resolve => {
Expand Down Expand Up @@ -64,7 +62,7 @@ function getOrchestraView( options ) {

return ( request, reply ) => {

debug( 'getOrchestraView', options );
debug( 'getOrchestraView' );

_evokeCallbacks( request, options ).then( () => {

Expand All @@ -88,14 +86,14 @@ function getOrchestraView( options ) {
let page;
let file;

debug( 'getOrchestraView', templates );
debug( 'getOrchestraView templates', templates.length );

templates.forEach( s => {

debug( 'getOrchestraView', file );

file = path.join(_options.views, s.path );

debug( 'getOrchestraView file', file );

if ( !fs.existsSync( file ) ) {

return console.error( 'WARNING: missing file ' + file, 'for template ' + s.id );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hapi-orchestra-view",
"version": "1.0.2",
"version": "1.0.3",
"description": "Library for composing web-page views",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 4fb3490

Please sign in to comment.