Closed Anachron closed 11 years ago
The mainOverrides
provides all the functionality you need in this regard.
A created this awhile ago as a detailed doc'd example: https://gist.github.com/dbashford/7189582
Thank you for the information. I was checking it and I was thinking:
"knockout.js":["knockout.js","knockout-2.3.0.debug.js"]
Is it possible to pass regexpressions to the files/folders array? I mean I don't want it to only work with 2.3.0, but rather with all versions (knockout-[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.debug.js)
Trying to write a configuration that works for current and future relases, providing the syntax wont change.
It is not possible to provide regexes.
So how is it possible to do what I want? By the way, is it possible to write it into target directory vendor.javascripts/{PLUGIN}/{VERSION}?
You could maybe add a config to create subfolders for versions.
It isn't possible to do what you want considering what you want is to use regexes. =)
Create targeted/specific issues in the mimosa-bower repo for whatever you'd like to see added. Feel free to make multiple if what you are asking for can be done separately. More likely to get done if they are small and well targeted.
I don't care too much about regex, I think I am fine if it's something like: vendor.javascripts/{PLUGIN}/{VERSION}
You could grab the bower-version (which is in semver) and add it to the path. I could also add latest as additional folder, but I would rather refer to a specific version.
About the bower stuff: They don't seem to care, they opened their api and that's all they want to give. Seems like I have to do the programming by myself.
The Bower folks are very clear that they just do the job to pull the component's assets to the local machine. Its up to build tools (like Mimosa) to allow you to specifically place them where you need to. They've been clear from the outset that it is a tool's job to move things around.
I'm good with that. =) It gives me problems to solve.
Hahaha, I don't ask for this stuff because I want to give you something to work. I do it because I have the need. =)
In my programs I like to have it tidy and to always know which version I am working with. It really prevents mistakes and problems.
@dbashford The bower spec is beginning to come together so your job will be much easier (it specifies main js file) https://github.com/benschwarz/bower.json-spec because you will only need to follow the requires(""), which will be quite similar to ES6 modules.
The bower spec has always had the main
file, yeah? There are plenty of bower.json
s out there that specific a main
. And that's perfect for those Bower packages that meet the spec. But there are plenty, it seems like at least half, that publish to Bower, but do not work to specify the main files. It's that scenario that makes things difficult and requires all sorts of creative mechanisms to help the user configure their way to the important files.
Will you reopen this ticket? I think it's good to have a little more control over bower components.
Open a new one in mimosa-bower with the specifics of what you want.
On 2013-11-11 18:02:27 +0000 Anachron notifications@github.com wrote:
Will you reopen this ticket? I think it's good to have a little more control over bower components.
Reply to this email directly or view it on GitHub: https://github.com/dbashford/mimosa/issues/311#issuecomment-28222766
Okay, will do after I gave it a few more thoughts. =)
"It's that scenario that makes things difficult and requires all sorts of creative mechanisms to help the user configure their way to the important files." I think the hope is that with a spec Bower will then enforce correct package definitions thereby making it much easier for tools/IDEs to work with Bower packages.
I've created a new ticket for this case https://github.com/dbashford/mimosa-bower/issues/30
Yeah, I hear ya. That would be nice.
But at this point there are thousands of violators. Can't kick them out.
On 2013-11-12 11:24:17 +0000 Brian Di Palma notifications@github.com wrote:
"It's that scenario that makes things difficult and requires all sorts of creative mechanisms to help the user configure their way to the important files." I think the hope is that with a spec Bower will then enforce correct package definitions thereby making it much easier for tools/IDEs to work with Bower packages.
Reply to this email directly or view it on GitHub: https://github.com/dbashford/mimosa/issues/311#issuecomment-28278559
@dbashford I think what's meant to happen is Bower will have it's own repo, much like maven, and anything that is registered there must follow the Bower spec. There will be auth, more formal then the current set up.
What I need is to copy the Bower-Components to specific locations.
I've been opened this ticket: https://github.com/bower/bower/issues/962
And found out that it's possible to hook to the Bower events. Now I have checked Mimosa-Bower and found the bower.copy.pathMod configuration.
I think it's not quite what I need. Should I/we implement this feature into Mimosa(-Bower) or change it locally?
I think it would be quite handy to give all users the chance to redirect Bower components with exclude/include rules.
If I miss something, please tell me!