jsblocks
jsblocks copied to clipboard
How can we use asset pipeline library with jsblocks server.
Hi,
Could we use this: https://github.com/adunkman/connect-assets with jsblocks server?
Or https://github.com/nodeca/mincer ? Any other alternatives?
Could you give me the example to do that?
Thanks.
Hey @chardy.
I'm sorry to say, but currently you can't.
Css/Client side resources might be possible (I'm not sure how express.static
handles caching) through a watching build system like grunt or gulp. But with js/html it's currently not possible. Jsblocks will cache the code itself even if (cache: false) (will only reexecute the "known" code) is set.
Maybe could an option debugging
could be added that would register an fs.watcher
for the app that clears the caches if a file changes. So a normal
build system could be used for the app.
What do you think?
I am currently using ruby on rails with jsblocks. The only issue with that is the "back history" button is not working. I think I mentioned that before. Thats why I am moving my client to jsblocks server. But now, another issue is the difficulty integrating it with mincer.
I'm not sure if migrating something to blocks serverside rendering is the best decision right now, as it's not nearly feature complete and has some issues. I couldn't reproduce your issue with the "back history" you mentioned in #137.