Last active
August 29, 2015 14:08
-
-
Save mikkoh/4b22a342e33f7f841779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promise.resolve( { | |
req: req, | |
model: require( '../model' ), | |
dataHBS: require( 'fs' ).readFileSync( './src/hbs/record.hbs', 'utf8' ) | |
}) | |
.then( modelstatic ) | |
.then( handlebars ) | |
.then( domappend ) | |
.then( function( data ) { | |
var model = data.model; | |
// do something fancy | |
return data; | |
}.bind( this) ) | |
.then( onComplete ) | |
.catch( function( e ) { | |
console.log( e.stack ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin( req ) | |
.model( require( '../model' ) ) | |
.dataHBS( require( 'fs' ).readFileSync( './src/hbs/record.hbs', 'utf8' ) ) | |
.then( modelstatic ) | |
.then( handlebars ) | |
.then( domappend ) | |
.then( function( data ) { | |
var model = data.model; | |
// do something fancy | |
return data; | |
}.bind( this) ) | |
.then( onComplete ) | |
.catch( function( e ) { | |
console.log( e.stack ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment