jonkemp / gulp-useref

Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
MIT License
705 stars 93 forks source link

Useref 3.0 searchPath is broken #149

Closed Andrey-Pavlov closed 8 years ago

Andrey-Pavlov commented 8 years ago
.pipe($.useref({searchPath: ['.tmp/partials', 'src', '.tmp/serve']}))

Error: File not found with singular glob: /home/xxx/xxx/{.tmp/partials,src,.tmp/bower_components/angular-toastr/dist/angular-toastr.css

But it works if

.pipe($.useref({searchPath: ['.tmp', 'src', '.']}))
jonkemp commented 8 years ago

This should be fixed now in 3.0.1. Please try that and let me know.

Andrey-Pavlov commented 8 years ago

Thank you. Fixed.

agustin107 commented 8 years ago

I have the same issue, because I'm working on project of webapp-generator, and when I try the command gulp, throw this error:

` /var/www/Github/ppfa_html/node_modules/gulp-useref/node_modules/vinyl-fs/lib/src/index.js:32 throw new Error('Invalid glob argument: ' + glob); ^

Error: Invalid glob argument: at Object.src (/var/www/Github/ppfa_html/node_modules/gulp-useref/node_modules/vinyl-fs/lib/src/index.js:32:11) at DestroyableTransform.module.exports.addAssetsToStream (/var/www/Github/ppfa_html/node_modules/gulp-useref/lib/streamManager.js:85:23) at /var/www/Github/ppfa_html/node_modules/gulp-useref/lib/streamManager.js:142:47 at Array.forEach (native) at DestroyableTransform.module.exports.processAssets (/var/www/Github/ppfa_html/node_modules/gulp-useref/lib/streamManager.js:133:19) at DestroyableTransform.module.exports.processFilesAndAssets (/var/www/Github/ppfa_html/node_modules/gulp-useref/lib/streamManager.js:172:39) at /var/www/Github/ppfa_html/node_modules/gulp-useref/lib/streamManager.js:182:47 at Stream. (/var/www/Github/ppfa_html/node_modules/event-stream/index.js:306:20) at _end (/var/www/Github/ppfa_html/node_modules/through/index.js:65:9) at Stream.stream.end (/var/www/Github/ppfa_html/node_modules/through/index.js:74:5) `

jonkemp commented 8 years ago

@agustin107 Please try to be as detailed as possible. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? All these details will help people to fix any potential bugs. Thanks!