Permalink
Browse files

fix(importer): prevent duplicate dist

  • Loading branch information...
gishmel committed Jul 4, 2017
1 parent cdb2eb3 commit a22dc3d22cfd8bf4d4e48a1a2f4c69adae6dadf6
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/importer/services/resource-inclusion.js
@@ -58,7 +58,14 @@ let ResourceInclusion = class {
getResources(globExpr) {
return this.glob(globExpr, { cwd: this.package.rootPath })
.then(files => files.map(file => path.posix.join(file)));
.then(files => files.map(file => {
let directoryFromPath = this.package.path.substring(this.package.path.lastIndexOf('/') + 1);
let directoryFromFile = file.split('/').shift();
if (directoryFromPath == directoryFromFile) {
file = file.substring(file.indexOf('/') + 1)
}
return path.posix.join(file);
}));
}
glob(globExpr, options) {

0 comments on commit a22dc3d

Please sign in to comment.