Skip to content

Commit

Permalink
Change options.settings.view to this.root
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno12mota committed Apr 13, 2015
1 parent 66547be commit 56ab09d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = function engineFactory (engineOptions) {
staticMarkup: false
});

require('babel/register')(engineOptions.babel);
if (engineOptions.babel) {
require('babel/register')(engineOptions.babel);
}

return function renderComponent (filename, options, callback) {
options = options || {};
Expand All @@ -30,7 +32,7 @@ module.exports = function engineFactory (engineOptions) {
}

if (engineOptions.wrapper) {
var Wrapper = require(path.join(options.settings.views, engineOptions.wrapper));
var Wrapper = require(path.join(this.root, engineOptions.wrapper));
var wrapperInstance = React.createElement(Wrapper, {
body: componentMarkup,
props: options
Expand Down

0 comments on commit 56ab09d

Please sign in to comment.