Skip to content

Commit 69bfd13

Browse files
Jonathanunimonkiez
authored andcommitted
Fix possible duplicates
1 parent a5ceb19 commit 69bfd13

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules/
1+
node_modules/
2+
.idea/

lib/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ const cleanAssetsAndroid = require('./clean-assets/android');
77
const getManifest = require('./manifest/index');
88
const log = require('npmlog');
99
const sha1File = require('sha1-file');
10+
const _ = require('lodash');
1011
const getConfig = require('./get-config');
1112

1213
const cwd = process.cwd();
1314

1415
const unl = (val, otherwise) => ((val !== undefined) ? val : otherwise);
1516

17+
const clearDuplicated = files => _.uniqBy(files, f => path.parse(f.path).base)
18+
1619
const filesToIgnore = [
1720
'.DS_Store',
1821
'Thumbs.db',
@@ -87,8 +90,11 @@ const linkPlatform = ({
8790
});
8891
}
8992
};
93+
9094
assetsPaths.forEach(loadAsset);
9195

96+
assets = clearDuplicated(assets);
97+
9298
const fileFilters = []
9399
.concat(Object.keys(linkOptionsPerExt).map(fileExt => ({
94100
name: fileExt,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"dependencies": {
3838
"fs-extra": "^7.0.1",
3939
"npmlog": "^4.1.2",
40+
"lodash": "4.17.21",
4041
"plist": "^3.0.1",
4142
"sha1-file": "^1.0.4",
4243
"xcode": "^2.0.0"

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,11 @@ lodash.sortby@^4.7.0:
20112011
version "4.7.0"
20122012
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
20132013

2014+
2015+
version "4.17.21"
2016+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
2017+
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
2018+
20142019
lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0:
20152020
version "4.17.5"
20162021
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"

0 commit comments

Comments
 (0)