diff --git a/lib/blocksBuilder.js b/lib/blocksBuilder.js index d1b503b..885aa3d 100644 --- a/lib/blocksBuilder.js +++ b/lib/blocksBuilder.js @@ -16,6 +16,7 @@ module.exports = function(file, options) { var basePath = file.base; var mainPath = path.dirname(file.path); + var outputPath = options.outputRelativePath || ''; var content = String(file.contents); var sections = content.split(endReg); var blocks = []; @@ -84,7 +85,7 @@ module.exports = function(file, options) { blocks.push({ type: section[1].indexOf('inline') !== -1 ? 'inlinejs' : 'js', nameInHTML: section[3], - name: section[4], + name: outputPath + section[4], files: getFiles(section[5], jsReg, section[2]), tasks: options[section[1]] }); @@ -92,7 +93,7 @@ module.exports = function(file, options) { blocks.push({ type: section[1].indexOf('inline') !== -1 ? 'inlinecss' : 'css', nameInHTML: section[3], - name: section[4], + name: outputPath + section[4], files: getFiles(section[5], cssReg, section[2]), tasks: options[section[1]], mediaQuery: cssMediaQuery