Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Igloczek committed Jul 3, 2017
2 parents 4362bc3 + 516ca7b commit 35ee5f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snowdog/frontools",
"description": "Set of front-end tools for Magento 2, based on Gulp.js",
"version": "1.5.2",
"version": "1.5.3",
"license": "MIT",
"type": "magento2-component"
}
23 changes: 7 additions & 16 deletions helper/inheritance-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@ module.exports = function(plugins, config, name, tree = true) { // eslint-disabl
[src + '/**'].concat(ignore.map(pattern => '!/**/' + pattern)),
{ nodir: true }
).forEach(srcPath => {
let destPath = path.join(dest, srcPath);
// Iterate through all replace patterns and apply them
if (Array.isArray(replacePattern)) {
replacePattern.forEach(replace => {
destPath = destPath.replace(replace[0], replace[1]);
});
}
else {
destPath = destPath.replace(replacePattern, '');
}
createSymlink(srcPath, destPath);
createSymlink(
srcPath,
path.join(dest, srcPath).replace(src + '/', replacePattern + '/')
);
});
}

Expand Down Expand Up @@ -61,21 +54,19 @@ module.exports = function(plugins, config, name, tree = true) { // eslint-disabl
generateSymlinks(
moduleSrc,
themeDest,
[
[moduleSrc, '/' + name]
],
'/' + name,
theme.ignore
);
});
}

if (theme.parent) {
const parentSrc = config.tempPath + config.themes[theme.parent].dest.replace('pub/static', '');
generateSymlinks(parentSrc, themeDest, parentSrc, config.themes[theme.parent].ignore);
generateSymlinks(parentSrc, themeDest, '', config.themes[theme.parent].ignore);
}

// Create symlinks to all files in this theme. Will overwritte parent symlinks if exist.
generateSymlinks(themeSrc, themeDest, themeSrc, theme.ignore);
generateSymlinks(themeSrc, themeDest, '', theme.ignore);
});

resolve();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "magento2-frontools",
"version": "1.5.2",
"version": "1.5.3",
"author": {
"name": "Bartek Igielski",
"email": "[email protected]"
Expand Down

0 comments on commit 35ee5f8

Please sign in to comment.