Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with globs #97

Closed
sergeymorkovkin opened this issue Apr 11, 2019 · 2 comments
Closed

Problem with globs #97

sergeymorkovkin opened this issue Apr 11, 2019 · 2 comments

Comments

@sergeymorkovkin
Copy link

Whenever we use a bit more comlex glob patter as compared to plugin example, sprite file naming convention breaks. For example, ./src/globals/sprites/**/*.svg would name all resulting sprites "sprites.svg", since it's the last part before the glob pattern. Therefore, users can only have one sprite with your plugin. I'm using Gulp 4 and not sure about other versions.

@sergeymorkovkin
Copy link
Author

sergeymorkovkin commented Apr 11, 2019

As a quick fix I recommend changing this:

fileName = path.basename(file.base)

to this:

fileName = path.basename(path.dirname(file.path))

@w0rm
Copy link
Owner

w0rm commented May 1, 2020

Hi, I don't want to introduce breaking changes and solve too many use cases that can be addressed using other gulp plugins. I believe that gulp-rename provides the flexibility that you need.

From the readme:

If your workflow is different, please use gulp-rename to rename sources or result.

@w0rm w0rm closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants