Closed ivandotv closed 10 years ago
Can you tell me what you are expecting?
Should this plugin select jquery.min.js
and jquery.min.map
in dir_1/dir_2
?
It's selecting the correct files but it's not making the directories. So files end up in /jquery/dist/
But i need them in /jquery/dir_1/dir_2/
This is because the base
option for gulp.src
will be set to the path where your bower_components
directory if this option is not set.
I'm not really sure what you are trying to explain. This is how I'm using the plugin.
gulpBowerFiles().pipe(gulp.dest("./client/vendor"));
So I expect to get files is client/vendor/jquery/dir_1/dir_2/jquery.min.js
But I get the files in client/vendor/jquery/dist/jquery.min.js
"overrides": {
"jquery": {
"main": ["./dir_1/dir_2/jquery.min.js","./dir_1/dir_2/jquery.min.map"]
}
With this override option you can change the source path, not the destination.
If you have the following bower_components structure:
./bower_components/jquery/dist/jquery.min.js
The base
option will be set to:
./bower_components
So if you copy to:
client/vendor
You will get:
client/vendor/jquery/dist/jquery.min.js
You will not be able to affect the destination path. What is your intention? May be there is another way to solve this problem.
Okay so I misunderstood the overrides
functionality.
Basically what I need to do is change the destination.
But why? Whats wrong with dist/jquery.min.js?
Anyway this plugin has nothing to do with destination path, you can use gulp-flatten
and/or gulp-filter
to solve this problem.
Hope this will help you.
I'll look in to that, thank you.
I'm trying to do an override with a custom directory structure, currently I don't think it's possible.
I always get
jquery/dist/jquery.min.js
Original jquery (bower file) :"main": "dist/jquery.js"