3

I was planning to use Sass with my Spring-MVC application. From Sass-lang website I got this Maven LibSass Plugin. I have put it in my pom.xml

But I am really confused with what next?

The major doubts I have are:

  1. Which directory I should keep my Sass files in?
  2. How do I include them in my HTML files?
  3. What should be the target dir?

As of now, if I keep directories as suggested by my plug-in, it crashes either eclipse or stalls maven clean and install goal execution. I very new to this concept. Do let me know if you need any other info.

Priyank Thakkar
  • 4,752
  • 19
  • 57
  • 93

1 Answers1

1

Actually these are all up to you.

  1. You can choose an arbitrary directory. Most probably you would not want to serve Sass files. Thus this directory should not be deployed. libsass examples use src/main/sass directory.
  2. You should include the .css files created at the target directory manually. libsass does not handle this part. There is no automatic inclusion of the compiled .css files as in Ruby on Rails platform.
  3. Target directory is arbitrary again. Remember the choice of directory depends on how you will refer to these files at views. For example if you will be manually referring them, most probably you'll want to specify a target directory that is actually deployed to application server, such as src/main/resources/css.
infiniteRefactor
  • 1,940
  • 15
  • 22