Promise based support for Template.prototype.evaluate
See original GitHub issueI was hoping to make a mincer plugin for Rollup, however their API is promise based. Could you support this in Template.prototype.evaluate
?
Right now, if I specify a Promise based function for evaluate
, when Mincer invokes evaluate
, it won’t wait for the Promise to resolve.
Also see this Stackoverflow question: http://stackoverflow.com/questions/21424867/run-an-asynchronous-stream-based-function-synchronously-in-node-js
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Promise - JavaScript - MDN Web Docs
Creates a new Promise object. The constructor is primarily used to wrap functions that do not already support promises. Static methods. Promise.
Read more >Prototype Testing: A Step by Step Guide (2022) | Blog
The first step of any prototype testing and evaluation is collecting and analyzing the user data and information. Here, the users or the...
Read more >Evaluating Prototypes - Tamarack Institute
A process to help innovators make ideas tangible, learn by doing, and quickly test whether they hold promise for further de- velopment. A...
Read more >Test & Demonstrate | Adaptive Acquisition Framework - DAU
Rapid Prototyping Test and Evaluation (T&E) ... The fundamental purpose of T&E is to enable the DoD to acquire systems that support the...
Read more >Understanding Template Literals in JavaScript - DigitalOcean
In this context, interpolation refers to the evaluation of a placeholder as a dynamic part of a string. The use of single- or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you decide to dig nodeca bundler or create your own, pay attention to macros implementation and related things. The most painful problem is that you can have only sync helpers in html templates, but may wish async imlementations of plugins. If helper’s dependencies (asset’s url for example) are not ready, you can’t silently build those after helper invoked.
Solution is to throw error “unfulfiled dependencies”, build missed ones and rerun build of resource that caused error. At least, that worked with my use cases. That’s the main logical collision you should care if you decide to create complicated assets bundler.
Fair enough, I admire the effort you’ve put into, for example, plugins, it’s interesting to see. Thanks for explaining!