These are chat archives for assetgraph/assetgraph

13th
Sep 2016
Andreas Lind
@papandreou
Sep 13 2016 06:32
@Munter Looking
Andreas Lind
@papandreou
Sep 13 2016 06:41
@Munter It's down to those HtmlDnsPrefetchLink relations being unresolved because you're not following crossorigin relations.
To query those unresolved relations, you presently have to add a second parameter of true to findRelations, and use the to contain relations including unresolved assertion.
Needless to say, this is some of the API awkwardness that I would like to fix soon.
IIRC the choice to keep asset config objects dangling like that instead of an asset in an unloaded state is that we don't know the type of //assetgraph.org/ without actually fetching it to get to its metadata. If we could figure out a way to instantiate an Asset and put it in the graph immediately, and then later replace it or "subclass it dynamically", we could get rid of that.
I pushed the needed changes to the branch.
Peter Müller
@Munter
Sep 13 2016 06:57
Thanks. I should have remembered that. Was a bit tired yesterday :(
Andreas Lind
@papandreou
Sep 13 2016 06:57
@Munter Don't worry about it :)
... Except... Let's fix it :)
Peter Müller
@Munter
Sep 13 2016 06:59
Recasting an asset would be cool. That would also solve that thing I had on the yeoman page where they linked to their atom feed with an anchor
Andreas Lind
@papandreou
Sep 13 2016 06:59
@Munter Oh yeah... Hmm
Would be nice to sit down and reimagine the whole API, including querying and transforms.
Peter Müller
@Munter
Sep 13 2016 07:57
Feedback from Johannes Ewald, a webpack plugin contributor:
blob
He's putting his finger exactly where it hurts
Andreas Lind
@papandreou
Sep 13 2016 07:58
blush
Outdated docs are really annoying
Peter Müller
@Munter
Sep 13 2016 08:00
At some point we need to bite that bullet an set up a proper docs site
Andreas Lind
@papandreou
Sep 13 2016 08:00
@Munter Let's do that once we've perfected the API ;)
Peter Müller
@Munter
Sep 13 2016 08:02
But certainly these points are very valid. Documentation, a good explanation of how this and transpiling fit into a workflow, support for third party frameworks like ember, angular, react etc
Andreas Lind
@papandreou
Sep 13 2016 08:12
That would be a good start.
Peter Müller
@Munter
Sep 13 2016 11:03
Could https://www.w3.org/TR/web-packaging/ actually be used as an assetgraph serialization format as well?
It's not going to save us any time on re-parsing everything, but maybe the reduced amount of file reads and incremental discovery will speed things up a little
Andreas Lind
@papandreou
Sep 13 2016 11:38
@Munter Interesting... Shouldn't be a big deal to implement. I wonder how we can integrate it and whether it's useful for other things as well, such as a snapshot format and for including desired response headers.
Peter Müller
@Munter
Sep 13 2016 12:08
If this becomes a streaming container format in browsers we need to deal with the nesting case though :)
Andreas Lind
@papandreou
Sep 13 2016 12:27
Nested packages?
Peter Müller
@Munter
Sep 13 2016 12:29
Say we want to serialise a graph that also contains one of these web packages referenced from a HTML file
Andreas Lind
@papandreou
Sep 13 2016 12:29
Ah, yes.
I guess we'll need to model it as an asset.
Peter Müller
@Munter
Sep 13 2016 12:29
Indeed