-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Reorganize bundles and buildles #6299
Comments
@paulirish prefered |
👍 I like it. |
I like it too 👍 I'm partial to In JS-land I feel like I've seen |
I have never seen |
I assume
good point. In our case the root directory is our npm package, while this directory is going to be specifically npmignored |
I'm so curious, why no ❤️ for |
ha, it's probably all on me. My first thought when I see Seriously, almost every time I see it :) |
I like consumers and dist folders 🤷♂️ I'm not 100% sure of the build-extension name. If we call the folder clients, shouldn't we call it build-client.js or bundle-client.js? Extension seems wrong. |
But we can also pick a better name :) |
build-client.js 🙃 ? The reason why I think extension is not a correct name is because IMO it tells me that it builds the chrome extension. That's the only reason why I would replace "extension"
|
Oh, sorry, I see now. Yes, I would take the others out and have it only build the extension (much simpler that way). The other clients would be built elsewhere (pretty much a one liner each) |
switched to |
Originally we had only
popup.js
, which split off into thelighthouse-background.js
extension entry point, which then also hosted a DevTools entry point, which split off into its own file that the extension entry point extended, then LR lived in there and then also split off, and then finally all the entry files were independent.In all this time, they've all lived in
lighthouse-extension/app/src/
, and when built they all ended up inlighthouse-extension/dist/scripts/
, even though 2/3 of them now have nothing to do with the extension except they share a build script.#6295 splits building those files and building the extension, which means we can now do a clean reorg of those files without much fuss. Ideally the result would be easily navigable and obvious in its purpose, with no weirdness based on git history that's long disappeared.
Here's my suggestion, but I don't find it completely satisfying and I'm not particularly wedded to the structure or names.
"(now usingbundles/
" is a dumb name.clients/
?channels/
? It's nice to describe that they are clients/channels, but they only work when bundled and then run somewhere else.clients/
)That aside, it makes sense to have the entry points in a top-level directory (similar to
cli/
), but also makes sense to group them together because they aren't independent, executable entry points into the module itself (unlike the CLI, they're only useful after building).It would also be great to move to a top-level output of the build step.
out/
is popular in some parts of the world, but we can take our pick.Thoughts?
more requirements:
The text was updated successfully, but these errors were encountered: