jsblocks icon indicating copy to clipboard operation
jsblocks copied to clipboard

How can we use asset pipeline library with jsblocks server.

Open chardy opened this issue 8 years ago • 3 comments

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.

chardy avatar Apr 28 '16 04:04 chardy

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?

Kanaye avatar Apr 28 '16 20:04 Kanaye

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.

chardy avatar Apr 28 '16 23:04 chardy

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.

Kanaye avatar Apr 29 '16 08:04 Kanaye