jonkemp / jonkemp/gulp-useref

Can I use the alternate search path and searchPath at the same time?

Open
#226 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
700
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Hi, @jonkemp
I want to be able to find the path use `alternate search path` first and and the option `searchPath` is not undefined will to be used in next!
I change my local modules `getPattern.js` code:
```javascript
if (files[destPath].searchPaths && searchPath) {
if(searchPath.startsWith('{')){
searchPaths = path.resolve(cwd, searchPath.replace('{', '{' + files[destPath].searchPaths+','));
}else{
searchPaths = path.resolve(cwd, '{'+ files[destPath].searchPaths + ',' + searchPath +'}');
}
}else if (files[destPath].searchPaths || searchPath) {
searchPaths = path.resolve(cwd, files[destPath].searchPaths || searchPath);
}
```
It work fine for me.would you like to add the feature to the next version?

Contributor guide

Open the contributing guide

Research direction

Start with getPattern.js and inspect how alternate search paths and the searchPath option are currently handled. Confirm that both paths can be used together in the requested order, then verify the resulting path resolution for each supported searchPath form.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.