(cfg)
| 417 | |
| 418 | // adds the path matching regexp onto the cfg or plugin cfgs. |
| 419 | function convertPathMatcher (cfg) { |
| 420 | var pathMap = cfg.pathMap; |
| 421 | cfg.pathRx = new RegExp('^(' + |
| 422 | cfg.pathList.sort(function (a, b) { return pathMap[a].specificity < pathMap[b].specificity; } ) |
| 423 | .join('|') |
| 424 | .replace(/\//g, '\\/') + |
| 425 | ')(?=\\/|$)' |
| 426 | ); |
| 427 | delete cfg.pathList; |
| 428 | } |
| 429 | |
| 430 | // fix all paths and packages |
| 431 | fixAndPushPaths(cfg['paths'], false); |