paulfairless / grails-lesscss-resources

Grails plugin for using the LESS CSS framework in conjunction with the grails-resource plugin family
Other
35 stars 27 forks source link

@import Problem #3

Closed beckje01 closed 13 years ago

beckje01 commented 13 years ago

When using the less command to import another style sheet that is not listed as a resource it can't find the file. It seems to be looking for the file relative to the directory where the resource plugin is doing its work not relative to where the less file started.

It would be useful to still be able to do the @import so we could have a common less file across different platforms and not need to depend on the resource plugin to bundle in the files.

paulfairless commented 13 years ago

version 0.5 updates the lesscss-engine to 1.1.4 - should resolve @import issues

beckje01 commented 13 years ago

I tested with 1.1.4 and confirmed it is still happening with using the @import "buttons.less"; it looks for the file in .grails\1.3.7\projects\lessTesting\tomcat\work\Tomcat\localhost\lessTesting\grails-resources\buttons.less but the file hasn't been copied there yet as.

It does seem to work as long as the imported files have been put into the resource bundle.

mathpere commented 13 years ago

The issue is still there with the release 0.5

With these two workarounds, this works but I think this issue should be reopened.

paulfairless commented 13 years ago

I think there is a fundamental clash between the @import and the resources framework. @import breaks some of the fundamental principles behind resources.

I will have to take some time and think how it can be properly supported.

beckje01 commented 13 years ago

I agree there is some clash but to start with it might just be best to document the issues with @import in the documentation. The only real problem case I can think of is when trying to share a set of less styles between a grails project and some other site. But if wouldn't be impossible to import all the needed less files for now, its not ideal as you have an extra place to maintain when updating that set of less files.

paulfairless commented 13 years ago

released version 0.6 - includes support for referencing file outside of resources with @import.

It does mean that changes to imported files will not trigger a recompile of the bundle.

mathpere commented 13 years ago

It works like a charm, thank you very much !