Permalink
Browse files

fix(tasks): wrong assets url replaced

  • Loading branch information...
sparanoid committed Aug 25, 2018
1 parent c05243c commit 8766c08a4df1f8149795b3d22ff59f23ddc528c7
Showing with 2 additions and 2 deletions.
  1. +2 −2 tasks/assets_inline.js
@@ -192,7 +192,7 @@ module.exports = function(grunt) {
} else {
var filePath = (style.substr(0, 1) === "/") ? path.resolve(options.cssDir, style.substr(1)) : path.join(path.dirname(filePair.src.toString()), style);
styles_dom_link_stylesheets[i].outerHTML = options.cssTags.start + grunt.file.read(filePath).replace(/[.]{2}\//g, options.assetsUrlPrefix) + options.cssTags.end;
styles_dom_link_stylesheets[i].outerHTML = options.cssTags.start + grunt.file.read(filePath).replace(/(\.{2}\/)+/g, options.assetsUrlPrefix + '/') + options.cssTags.end;
var deleteFlag = (' (will keep)').gray;
if (deleteOriginal) {
@@ -231,7 +231,7 @@ module.exports = function(grunt) {
var filePath = (script.substr(0, 1) === "/") ? path.resolve(options.jsDir, script.substr(1)) : path.join(path.dirname(filePair.src.toString()), script);
//create and replace script with new scipt tag
scripts_dom[i].outerHTML = options.jsTags.start + uglifyJS(grunt.file.read(filePath).replace(/[.]{2}\//g, options.assetsUrlPrefix)) + options.jsTags.end;
scripts_dom[i].outerHTML = options.jsTags.start + uglifyJS(grunt.file.read(filePath).replace(/(\.{2}\/)+/g, options.assetsUrlPrefix + '/')) + options.jsTags.end;
var deleteFlag = (' (will keep)').gray;
if (deleteOriginal) {

0 comments on commit 8766c08

Please sign in to comment.