Working with Plone 5.0.6 I've created a TTW theme and this is what the content of my manifest.cfg file looks like:
title = my theme
development-css = style.less
production-css = css/mystyle.css
I expect that when I go to "style.less" and select "build css" it would build the file in the location that production-css dictates (css/mystyle.css) instead it generates a file called "style.css" (basically matching the name of the less file).
I seem to recall this working previously (could it be a regression bug in Plone 5.0.6?)
Okay...tested this on Plone 5.0.5, no difference. It seems that I may have imagined this functionality (or wished it existed).
- the LESS file compiles to the equivalent css file name by convention, so hello.less, will compile to hello.css
- the production-css property is basically a way of naming the css file that should be associated with the theme
Yeah, could be indeed a bit more flexible.
It would be nice if the compiling uses the manifest option more, also to find the main less file to compile, so that it doesn't matter which file is selected, while clicking on the build button.
Yes, it only builds the currently selected file. It doesn't pay attention to any manifest settings. It's simply a tool to build less files.
It works though. The compiled resource is provided as the diazo data-bundle and is added to the theme when served, so that's good enough and predictable enough for me.
On another note, in the manifest.cfg I see no value in explicitly naming the theme path (e.g. ++theme.....):
development-css = ++theme++mycustomtheme/style.less
production-css = ++theme++mycustomtheme/style.css
Okaaaaaay!... updating this note.
There is great value since it's the only way to get the proper path to the theme's resources.
Be careful though, I've seen themes break because the path specifies a different theme name or a previous name, for example when the theme is copied, the only theme that dynamically renames these paths is the barceloneta theme.