Giter Club home page Giter Club logo

Comments (4)

oscarotero avatar oscarotero commented on May 10, 2024 1

Nice! Thank you.
FYI, this is the function called to perform an update after detecting changes: https://github.com/lumeland/lume/blob/master/site.js#L232
This function receives an array of files that have changed, in order to be reloaded again (I know, with Typescript it would be more obvious :) and finally build the site again.
Maybe we can pass this array of files to every template engine used, so they can update its internal cache if they need to.

from lume.

oscarotero avatar oscarotero commented on May 10, 2024

Yep, sure. Performance is super important.
Do you have any idea of how to implement this? If you want to contribute with a PR, that would be great.

Precompiled templates should be updated if we detect changes in the files (with --serve). For example, nunjuks has an internal cache that does not update so I had to clean it manually before every build https://github.com/lumeland/lume/blob/master/engines/nunjuks.js#L14

from lume.

shadowtime2000 avatar shadowtime2000 commented on May 10, 2024

I think I can implement this with a cache based on layout filepaths (possibly expand to just templates everywhere?) to hold the functions. Yeah, I am going to have to look into updating precompiled templates on detecting changes.

from lume.

oscarotero avatar oscarotero commented on May 10, 2024

Now that precompilation and cache was implemented in nunjuks, eta and pug, I'm closing this.

from lume.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.