-
Notifications
You must be signed in to change notification settings - Fork 25
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
What if I care about the anatomy of cartero's output directory? #48
Comments
Hi @mediafreakch ! The fingerprinting used in the current output directory scheme was implemented with certain requirements in mind - for example, to ensure that each package together with a unique set of package dependencies has a unique path. Although there are different directory structures that could be used, it would be easy to break functionality if those requirements were not met. However if you listen for the fileWritten event, you could in theory copy any output bundles or assets to whatever directory structure you'd like. Does that approach / event give you the information you need to put things where you want them? Thx! |
@dgbeck Could be a workaround yes. Just to clarify where this need comes from: We were looking at using the
An example would be that both |
Gotcha. Interesting.
Right now it is just the shared JS assets that are factored out into a common bundle right now. However, factoring out CSS assets into a common bundle seems both very in scope and doable. However, it seems that parcelify is the better tool for your needs, and that using cartero in this instance is a rather round-a-bout work around. Can you confirm you would benefit from having an extra option for parcelify, say,
Thanks! |
@dgbeck That sounds about awesome if parcelify would support such an option! So to factor out common JS + common CSS with parcelify I would use the Guess that this would make using the |
@dgbeck How can we continue from here? |
Hi @mediafreakch . Good point. I think the proper way to do this is to support the css case through parcelify and leave the js case for browserify and factor bundle. So
And in fact, we could just use the At this point I'm sold on the API and concept. It's just a bandwidth issue now. I'm not sure when I can get to this, the idea is great and the path is clear. We can also try to work on it on this end over the next couple of weeks, but you are welcome to do a PR as well. Keep us posted if you start working on a PR so we don't double up. Thx! |
Is there a way to influence how cartero outputs things into the output directory? I don't like the current approach that fingerprints folders and files. Cartero is not the last step in the build process, that's why a predictive file structure matters.
How about factoring this part out into a separate module that can be plugged into cartero optionally (or switching it off via options)?
I'm only interested in concatenating and factor out common modules between different entry points and asset types...
The text was updated successfully, but these errors were encountered: