@@ -12,17 +12,10 @@ module.exports = function(plugins, config, name, tree = true) { // eslint-disabl
12
12
[ src + '/**' ] . concat ( ignore . map ( pattern => '!/**/' + pattern ) ) ,
13
13
{ nodir : true }
14
14
) . forEach ( srcPath => {
15
- let destPath = path . join ( dest , srcPath ) ;
16
- // Iterate through all replace patterns and apply them
17
- if ( Array . isArray ( replacePattern ) ) {
18
- replacePattern . forEach ( replace => {
19
- destPath = destPath . replace ( replace [ 0 ] , replace [ 1 ] ) ;
20
- } ) ;
21
- }
22
- else {
23
- destPath = destPath . replace ( replacePattern , '' ) ;
24
- }
25
- createSymlink ( srcPath , destPath ) ;
15
+ createSymlink (
16
+ srcPath ,
17
+ path . join ( dest , srcPath ) . replace ( src + '/' , replacePattern + '/' )
18
+ ) ;
26
19
} ) ;
27
20
}
28
21
@@ -61,21 +54,19 @@ module.exports = function(plugins, config, name, tree = true) { // eslint-disabl
61
54
generateSymlinks (
62
55
moduleSrc ,
63
56
themeDest ,
64
- [
65
- [ moduleSrc , '/' + name ]
66
- ] ,
57
+ '/' + name ,
67
58
theme . ignore
68
59
) ;
69
60
} ) ;
70
61
}
71
62
72
63
if ( theme . parent ) {
73
64
const parentSrc = config . tempPath + config . themes [ theme . parent ] . dest . replace ( 'pub/static' , '' ) ;
74
- generateSymlinks ( parentSrc , themeDest , parentSrc , config . themes [ theme . parent ] . ignore ) ;
65
+ generateSymlinks ( parentSrc , themeDest , '' , config . themes [ theme . parent ] . ignore ) ;
75
66
}
76
67
77
68
// Create symlinks to all files in this theme. Will overwritte parent symlinks if exist.
78
- generateSymlinks ( themeSrc , themeDest , themeSrc , theme . ignore ) ;
69
+ generateSymlinks ( themeSrc , themeDest , '' , theme . ignore ) ;
79
70
} ) ;
80
71
81
72
resolve ( ) ;
0 commit comments