Comments (18)
Use dust 2.6.x for now. 2.7.0. broke API and isn't supported. (Dustjs does not follow semver: beware.)
I'm working with the dust team to make new integration points for adaro into the future.
from adaro.
Thanks for the quick response.
We just uninstalled dustjs-linkedin 2.7.0 and dustjs-helpers 1.7.0...
... and installed dustjs-linkedin 2.6.2 and dustjs-helpers 1.6.3
and the error persists.
Could this be related to a configuration option for Adaro we need to set?
(by the way the README.md mentions that there are Config options that can be set, but it does not specify what those are, or at least we could not find them anywhere)
Thanks again
from adaro.
It can!
Can you try without the leading slash on the partial name? Usually dust templates don't do that.
from adaro.
Yeah... that worked!
But it should not... "shared/page_ready" is a relative path to the folder the current file is stored whereas "/shared/page_ready" is a root-relative path (being root the views folder).
It's ok for now to make this work but I think this should be changed in the future to be consistent to how relative links works in a website.
One extra thing... when we modified the dust file the changes did not showed up so we had to restart the server altogether. I guess this might be due to caching of the dust files. How can we disable caching? (very useful when we are developing)
from adaro.
At the moment, dustjacket always caches, into the dust cache. It's trivial to write a module (or dustjacket loader) that just clears the cache on every call.) I'd do that for now.
The dust 2.7 release threw a wrench in my plans, but the new infrastructure it exposes should make this easier in the future.
from adaro.
Anyway: dust templates have never used relative-to-current-file naming. It's always been a leading/
-less name from the root. It's not pretty, but plays nice with how dustc
works.
from adaro.
Ok, got it. We'll use that naming convention then.
We modified the dustjacket loader to clear the cache in every call and it works.
But it would be better if caching could be controlled through an Adaro config option so that caching could be turned on/off depending on whether the server is running on development/production mode etc. It would be VERY handy.
Actually I kind of believe it was that way in earlier versions of Adaro, but the 'cache' option does not work any longer.
from adaro.
Indeed -- adaro2 is a rewrite, but the dust API change has thrown me. I'll be making things more dev-friendly soon.
from adaro.
Excellent. Great work indeed.
We'll continue our work while the new changes in Adaro get ready. Also we have noticed Makara is requiring Adaro version "~0.1.7" so it's pointless to use Makara right now. We'll wait until you update these two modules since after a lot of evaluation Adaro+Makara is the combination we definitely want in our system.
from adaro.
What about makara are you after? My goal is to completely erase any need for makara (and in fact, in current kraken, makara is broken into many modules)
from adaro.
Also, just FYI, note that the adaro@2 releases are prerelease. 0.1.x are the currently stable branch.
from adaro.
Is Makara going to be discontinued or what do you mean by erasing any need for Makara?
We need a translation module and since we like dust engine and properties files (we come from the Java world) Makara seems like a perfect fit.
And yes, we used Adaro 0.1.x and Makara 1.0 in some tests apps and they worked just fine.
from adaro.
It will, though if I have my name, Makara will be the name for the i18n project within Kraken
from adaro.
The modern parts of makara are localizr, grunt-localizr, file-resolver, engine-munger, karka, and adaro.
from adaro.
Great. We made our app work with engine-munger.
krakenjs.com still points at Makara as the module to use for localization. That should be updated if the new bet is on engine-munger.
By the way we need the @usecontent helper for our templates...do you know if the dust-makara-helpers module is compatible with engine-munger?
from adaro.
Nope. That'll be part of the new world order. You could hack it together but it'd be a giant ball of configuration.
from adaro.
Damn it! Well... we'll see what we can do. Thanks!
from adaro.
Sure thing! Sorry you've found a transitional mess. I'm working to clean up these loose ends and give a new coherent system.
from adaro.
Related Issues (20)
- How to get dustjs instance from adaro HOT 16
- Docs seems outdated HOT 4
- adaro should expose a way to configure dust
- Update Dust.js to 2.7.4
- Need for Brook?
- TypeError: require.cache.hasOwnProperty is not a function HOT 4
- where is dustjs defined? HOT 1
- npm audit detected a vulnerability
- Dependency package has a security vulnerability HOT 1
- Does not work after Node v10
- TypeError: Cannot read property 'substr' of undefined HOT 33
- Document dust filter initialization using helpers: property. HOT 2
- Possible to stream without repeated code? HOT 2
- Documentation is inaccurate / missing HOT 11
- The rendering blocks / waits infinitely when using partials inside an helper context HOT 2
- Consider not requiring a .properties file for each .dust file HOT 3
- Reqwire always calls process.cwd with relative files HOT 1
- adaro/lib/patch/index.js:121:21: TypeError: Cannot read property 'name' of undefined HOT 7
- Looping issue when rendering an object hierarchy to ul/li tags HOT 1
- using dust with express HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaro.