X-Git-Url: https://juplo.de/gitweb/?p=website;a=blobdiff_plain;f=dist%2Fthymeleaf%2Fblog%2Farticle.html;h=0c175d8e28e3f3da18249f4209edfac2e5754b0a;hp=faf9ab0b08c2e04b5018dfb1a9388433d5910e4b;hb=7a13c07cb699a877427cdc0533fbb3d9f6615acf;hpb=3c6c6c0735bcccedf34fe5411d86777c3511f31a diff --git a/dist/thymeleaf/blog/article.html b/dist/thymeleaf/blog/article.html index faf9ab0b..0c175d8e 100644 --- a/dist/thymeleaf/blog/article.html +++ b/dist/thymeleaf/blog/article.html @@ -2,32 +2,20 @@ juplo - blog - Combining jetty-maven-plugin and wro4j-maven-plugin for Dynamic Reloading of LESS-Resources - - + + + + + + + - -
    -
  1. Home
  2. -
  3. Blog
  4. -
- +
@@ -41,14 +29,14 @@

You cannot do both, use the Client-side mode of LESS to ease development and use the lesscss-maven-plugin to automatically compile the LESS-sources into CSS for production. That does not work, because your stylesheets must be linked in different ways if you are switching between the client-side mode – which is best for development – and the pre-compiled mode – which is best for production. For the client-side mode you need something like:

   
-  <link rel="stylesheet" type="text/css" href="styles.less" />
-  <script src="less.js" type="text/javascript"></script>
+  <link rel="stylesheet/less" type="text/css" href="styles.less" />
+  <script src="../less.js" type="text/javascript"></script>
   
           

While, for the pre-compiled mode, you want to link to your stylesheets as usual, with:

   
-  <link rel="stylesheet" type="text/css" href="styles.css" />
+  <link rel="stylesheet/less" type="text/css" href="styles.css" />
   
           

While looking for a solution to this dilemma, I stumbled accross wro4j. Originally intended, to speed up page-delivery by combining and minimizing multiple resources into one through the use of a servlet-filter, this tool also comes with a maven-plugin, that let you do the same offline, while compiling your webapp.