diff --git a/lib/styleguide.js b/lib/styleguide.js index d99053b8..9616bb6c 100644 --- a/lib/styleguide.js +++ b/lib/styleguide.js @@ -39,7 +39,8 @@ var path = require('path'), distPath = path.join(__dirname, 'dist'), fileHashes = {}, jadeCache, - serverInstance; + serverInstance, + bemtoPath = require.resolve('bemto.jade'); function socketIsOpen() { return serverInstance && serverInstance.io; @@ -90,8 +91,11 @@ function groupModuleFiles(allModules) { function generateJadeMarkup(json, options) { jadeCache = new LocalCache(path.resolve(options.rootPath, 'jadecache.json')); + var rootPath = path.resolve(__dirname, '../'); + rootPath = path.relative(rootPath, bemtoPath); + // path to bemto - var bemtoinclude = 'include ./node_modules/bemto.jade/bemto.jade\n', + var bemtoinclude = 'include ./' + rootPath + '\n', jadeOptions = { filename: __dirname, basedir: process.cwd(),