Closed rreusser closed 7 years ago
I'm not totally convinced that this should be Idyll's responsibility rather than something that could be built on top of idyll. I guess the main thing lacking there would be it (1) wouldn't be able to optimize the bundle across pages and (2) couldn't do fancy single-page app stuff like replacing the page contents rather than reloading the page?
I agree this seems like something that could be done by a user on top of idyll and not something we should try to put in the project itself
From: Matthew Conlen notifications@github.com Sent: Thursday, June 8, 2017 6:51:20 PM To: idyll-lang/idyll Cc: Subscribed Subject: Re: [idyll-lang/idyll] Multiple file support (#69)
I'm not totally convinced that this should be Idyll's responsibility rather than something that could be built on top of idyll. I guess the main thing lacking there would be it (1) wouldn't be able to optimize the bundle across pages and (2) couldn't do fancy single-page app stuff like replacing the page contents rather than reloading the page?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/idyll-lang/idyll/issues/69#issuecomment-307248694, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAIkN-rKddYVAdOzEm_nvNhd88U532Tzks5sCHrogaJpZM4NodJy.
I kinda have to agree with both. I was thinking then it'd be a nice convenience to compute the output filename from the input filename, e.g. input.idl
➡️ input.html
and page2.idl
➡️ page2.html
. The problem is that the assets all overwrite each other. So then I was thinking maybe idyll *.idl
would copy the assets once and parse + write for each file. Except then the bundles don't work together. So in the end I think leave as-is and you can get fancy on your own. 😄
Right now the name of the output file is hard-coded as
index.html
. I'm just going to go out on a limb and propose:--batch
?) look for all.idl
files in the current directory._filename.html
and then_index.html
and then the internal_index.html
when looking for a template forfilename.idl
so that you could customize if desired..idyll/filename.ast.json
instead of.idyll/ast.json
) so that it can create a common bundle for all the components (can punt on component source bundle splitting for now, right?)index.js
. Or else it could be included separately so that you could do fancy history API transitions or something. But at that point, why are you using idyll instead of just writing a React app. Or at that point you could be usingidyll-compiler
and theInteractiveDocument
component within your own react app.The use-case of this would be, say, a project with multiple pages. Since they would all have the same component bundle you couldn't perfectly optimize the bundle for each page, but it would at least facilitate a MIMO pattern.