Comments (13)
In which OS you are trying? Normally, partials changes should cause to reload the page.
from punch.
I'm on OS X 10.7.
from punch.
Hmm. weird. I'm also using the same and it seems to work perfectly.
Can you paste the log of a session where you change a partial and then reload a page?
from punch.
Here it is:
~ punch setup punch_test
Created a new site in punch_test
To get started, run: cd punch_test; punch s
~ cd punch_test; punch s
Started Punch server on port 9009
127.0.0.1 - GET / HTTP/1.1 200 - - 12 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 200 - - 11 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 200 - - 14 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 200 - - 13 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 4 ms
127.0.0.1 - GET / HTTP/1.1 200 - - 7 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 1 ms
127.0.0.1 - GET / HTTP/1.1 200 - - 6 ms
127.0.0.1 - GET /css/normalize.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/main.css HTTP/1.1 304 - - 2 ms
127.0.0.1 - GET /css/site.css HTTP/1.1 304 - - 3 ms
127.0.0.1 - GET /favicon.ico HTTP/1.1 200 - - 2 ms
The first HTTP/1.1 200
is where I just opened localhost:9009
in my browser.
I then removed {{{first-run}}}
in _footer.mustache
and reloaded the page, where nothing changed.
I then added some text content in _layout.mustache
and reloaded the page. My new content was there, but the first run was still there too.
from punch.
Can you try adding some other content in to _footer.mustache
and see whether those get picked up?
I'm still unable to recreate the issue at this end.
from punch.
That's weird - I got the same problem here. I'll try to debug and I'll report back.
from punch.
@jbourassa Please let me know if you were able to regenerate the issue.
from punch.
@laktek If by "regenerate" you mean reproduce, yes I can. For what it's worth, I work with @renaudleo so our environments are very similar.
from punch.
@laktek Also, we're using CLI tools instead of XCode. Shrug.
from punch.
Is it expected that on a request, the server will regenerate the partials if they have changed with the following options?
"server": {
"cache" : {
"directives": ["public"]
}
}
Or do we need to have something like the following options if we want that behavior?
"server": {
"cache" : {
"directives": ["no-cache", "no-store"]
}
}
In both case, I have to kill the server then restart it and then only save the mustache file in order to see my change. If I want to make another change, I have to kill and restart to server again, and then save the file in order that a request to the server will regenerate the index.html file.
from punch.
@jbourassa It should work fine in CLI (actually, that's how it was intended to use).
@prathe Cache directive should have no effect, because the max-age is set to 0 by default. So even when the caching is enabled, it should reflect the changes on a reload.
The partials are detected as changed by their last modified time attribute. Can you check whether the OS/editor, sets the modified time correctly when you save the file?
from punch.
@laktek Ok, I figured it out. The cache in Mustache 0.7
is not being updated in properly, and it's fixed in HEAD. The issue is #257.
I see two ways of fixing this, use whichever you like best :
"mustache": "0.6"
"mustache": "git://github.com/janl/mustache.js.git#6bbc85fe26bc584fb215f2fdb63cabb79c0a03a8"
Yay :)
from punch.
Thanks guys for digging into this issue and finding the solution. I've released a new version, which contains @prathe's update for the Mustache version.
from punch.
Related Issues (20)
- TypeError: Cannot call method 'getTime' of null HOT 5
- Ability to add self-contained widgets (css, js, template) HOT 2
- Issues displaying {{date}} HOT 2
- style failed to compile HOT 2
- Cannot start server Connect has no method 'logger' HOT 1
- Can't get this working in a docker container
- Pulling bundle assets from outside local directory
- Punch Plugin: How to find the file path to the "templates" directory? HOT 2
- S3 gzip support
- Failed to read the configurations. HOT 1
- Copy command fails with paths that contain spaces HOT 1
- Failing basic setup HOT 2
- Trouble Implementing Autoprefixer compiler/minifier
- is this still happening? HOT 1
- Themes?
- What is the best practice for i18n?
- Creating intro.markdown in contents/_index during tutorial doesn't render the HTML HOT 1
- Custom compiler works only on generate HOT 4
- Javascript does not bundle HOT 1
- Mime.extension and Mime.lookup is not a function HOT 2
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 punch.