question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

  • Maybe get rid of the TransformQueue, just call each transform separately and await
  • Allow transforms to fulfill with at custom value (don’t force it to be the AssetGraph instance)
  • Plugin API: .use(…) with a function that can install assets, relations, and named transforms.
    • Consider an explicit Async suffix for async transforms? Could be enforced: “Error: You returned a promise from a transform whose name isn’t suffixed with Async”
    • Should plugins be installed per AssetGraph instance or globally? (I think I’d prefer the former)
  • Pluggable relations via asset-specific visitor functions
  • Spike: Make parseTree, text, rawSrc async again
  • New query syntax? Maybe try out https://github.com/crcn/sift.js (https://github.com/assetgraph/assetgraph/pull/814)

Follow-up 2017-12-30

TransformQueue

Agreement on dropping TransformQueue. The reason we were clinging to the idea of it was a potential instrumentation hook that could somehow discover graph access and record it in order to cache the transform step and skip it in an incremental rebuild style application. Since we have very few ideas on how to actually do this we’re in agreement that if we ever figure it out, we’ll cut a new major version which might introduce something similar to TransformQueue, but as an opt-in extra wrapper around transform calls.

TransformQueue is out. Transforms will be called with await resultingGraph = transformName(assetGraph, queryObject?, options);

Possible future api’s that were discussed, but not agreed on yet:

const minifyCss = require('assetgraph-minifyCss');

await minifyCss(assetGraph, {
    assetsQuery: {
        type: 'Css',
        isInline: false
    },
    mergeLonghand: false
});

await minifyCss(assetGraph.findAssets({ type: 'Css', isInline: false }, { mergeLonghand: false });

await assetGraph.transform({ type: 'Css', isInline: false }, minifyCss({
    mergeLonghand: false
}));

await assetGraph.transform(minifyCss({
    mergeLonghand: false
}), { type: 'Css', isInline: false});

await assetGraph.transform(minifyCss());

await minifyCss({ mergeLonghand: false })(assetGraph, optionalQuery);

await minifyCss({ mergeLonghand: false })(assetGraph);

sift.js

The current spike on a sift implementation seems to work, but has a hack for being able to query by identity and a hack for querying by regex with the same syntax that we had in AssetGraph.query. We want to remove the hack for regex querying and have things use the sift syntax: {$regex: /foo/}. The need for regex queries will be greatly reduced when #817 and #818 are implemented

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devmattrickcommented, Dec 27, 2017

@papandreou I use .njk as a file extension for them, but I believe .nunjucks and even .html is sometimes used by other people. I would pretty much just like to resolve the images, stylesheets, and scripts in the HTML portions, the actual templating could probably be handled by the Nunjucks compiler itself, I think.

0reactions
papandreoucommented, Dec 27, 2017

@devmattrick Can the nunchucks files distinguished from regular .html files based on a file extension or something similar?

… And I assume that what you want to accomplish is to discover the relations in the pure HTML parts of the nunchucks files?

Read more comments on GitHub >

github_iconTop Results From Across the Web

V4Ideas
V4IDEAS is a full-service digital agency based out of Mississauga, Canada. V4IDEAS focus on providing unique and effective websites, ...
Read more >
400 Ducati V4/V4R ideas in 2022 - Pinterest
Aug 16, 2022 - Explore Tisan's board "Ducati V4/V4R" on Pinterest. See more ideas about ducati, ducati panigale, ducati motorcycles.
Read more >
Dota Ideas v4 new discord : r/DotA2 - Reddit
We are excited to announce that the new version of Dota Ideas is coming soon, and we want your input! We have created...
Read more >
VS. Impostor v4 Ideas | Fandom - Funkipedia Mods Wiki
Toomongus's robot suit crying is cursed. We are speaking about a {{hampter}} that is controlling a robot suit that resemble a crewmate. VIEW...
Read more >
Zappiti Media Center v4 (114 ideas) - Zappiti (English)
Artwork for the library should be downloaded and stored locally on the Zappiti rather than loaded from Zappiti Server each time.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found