Comments (4)
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.
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.
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.
Now that precompilation and cache was implemented in nunjuks, eta and pug, I'm closing this.
from lume.
Related Issues (20)
- (remark): Support for passing through remarkRehype configuration HOT 8
- Picture/Imagick fails to display image starting with a date in the filename HOT 6
- Cannot copy nested directory starting with underscore prefix HOT 2
- nunjucks include in for loop breaks build HOT 2
- Lightning CSS canβt be configured to use a different includes folder HOT 3
- Picture plugin doesn't optimize image HOT 2
- Remove deno.lock file on upgrade Lume
- Multilanguage plugin: support x-default HOT 1
- Transform Images plugin should avoid upsizing images have smaller size than the resize options. HOT 2
- page.search with `url` not working HOT 3
- Split core functionality in `mod.ts` HOT 2
- Rename the first param of Processor callback type
- Image transform does not work with all caps JPG extension HOT 3
- robots.txt plugin HOT 6
- Upgrading to Lume 2.0.x is breaking the build HOT 2
- "vto is not defined" HOT 4
- Client side Javascript broken (or works differently) in lume 2.0.x HOT 9
- JSX onclick attributes are stripped during build HOT 3
- Denying env permission for LUME_LOGS and LUME_NOCACHE should not be fatal HOT 3
- Nested components doesn't work (official doc example) 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 lume.