boot-reload icon indicating copy to clipboard operation
boot-reload copied to clipboard

Tighten up file reloading

Open martinklepsch opened this issue 11 years ago • 3 comments

As discovered in #2 sometimes files have not been reloaded even though they changed on disk. #4 has been an easy fix for this but isn't 100% exact. Imagine the following html:

<!doctype html>
<html>
  <head>
    <title>hi, world!</title>
    <link rel="stylesheet" href="main.css" type="text/css">
    <link rel="stylesheet" href="//some.cdn.com/framework/main.css" type="text/css">
  </head>
  <body>
    <script type="text/javascript" src="js/app.js"></script>
  </body>
</html>

Whenever main.css changes all other stylesheets ending in main.css will also be reloaded. It's probably not problematic in most cases but it'd be nice to get 100% exact reloading.

martinklepsch avatar Dec 10 '14 14:12 martinklepsch

what about specifying boot-reload's argument list of in-project path to URI path rules, something like:

(boot-reload :uri-rules {"target/public" "", "resources/foo" "bar"})

which mean a file with this in-project path public/css/garden.css should have URI /css/garden.css; while resources/foo/script.js would be served as localhost:port/bar/script.js

myguidingstar-zz avatar Jul 03 '15 11:07 myguidingstar-zz

@myguidingstar resources would be in :resources-paths meaning that boot-reload will never see the resources part of the path.

Also, :asset-path option was already added and I'm thinking it's good idea to keep all the local resources in one path (e.g. public: public/css/garden.css and public/foo/script.js).

Deraen avatar Jul 03 '15 12:07 Deraen

Still managed to reproduce this.

(include-css "css/main.css")
(include-css "css/css/main.css")

Deraen avatar Dec 21 '16 00:12 Deraen