How would one define a resource? As an object? Would this resource object include a specifier that describes the resource, like "some-file.css", "some-image.svg", or "http://unpkg.com/normalize.css"? Would this resource object also include a context that describes the current or active process referencing this resource? Like "file:/path/to/source.css", "file:/path/to/component.js", "http://unpkg.com/normalize.css", or "stdin:idk"?
How would one define how resources are resolved? Here’s one example of a resolve algorithm. e.g. Use this tool to resolve the path and then use this other tool to read its contents.
How would one define how resources are handled? e.g. Upon reading the contents of some imported resource as an AST, replace the current @import node with that AST.
How would one define importers in a stylesheet, like @import, and how their resources are resolved and handled?
How would one define metadata of a stylesheet? Could it be written into the stylesheet itself?
Could this metadata include definitions for importers, resolution algorithms, etc.?
"some-file.css"
,"some-image.svg"
, or"http://unpkg.com/normalize.css"
? Would this resource object also include a context that describes the current or active process referencing this resource? Like"file:/path/to/source.css"
,"file:/path/to/component.js"
,"http://unpkg.com/normalize.css"
, or"stdin:idk"
?@import
node with that AST.@import
, and how their resources are resolved and handled?