houbie / lesscss Goto Github PK
View Code? Open in Web Editor NEWJava Less CSS Compiler
License: Apache License 2.0
Java Less CSS Compiler
License: Apache License 2.0
I have stumbled over a bug (at least I think it's a bug, maybe I'm just using it wrong) when I try to compile the main.less
file in the following directory structure:
The content of main.less:
@import '../../imports/import';
The content of import.less:
@import 'otherimport';
When I try to run it using your lesscss on the commandline (with main.less
as the source) I receive the following error:
less parse exception: 'otherimport.less' wasn't found in ../../imports/import.less at line 1
extract
@import 'otherimport';
If I use the default/native/official lessc.bat
it works without a problem.
When I run it using the gradle plugin I can see following message before I get above error message, if run in debug mode:
reading @import imports/otherimport.less
resolving imports/otherimport.less relative to <mypath>\lesscssbug\styles\main\content
Finished executing task ':lessc'
Shouldn't it resolve the otherimport.less
relative to import.less
, and without the added imports
path?
My build.gradle
looks like this:
lessc {
sourceDir "styles/main/content"
include "main.less"
destinationDir = "$buildDir/css"
}
If I add "styles"
to sourceDir
it works, but having to do this doesn't seem right.
If my main.less
is in the main
-folder and uses
@import '../imports/import';
everything works fine. So the cause seems to be the use of more than one ../
in the path.
The content in main.less is:
@import 'linked';
And the build.gradle
looks like this:
lessc {
sourceDir "styles"
include "**/*.less"
destinationDir = "$buildDir/styles"
}
Or on command line, in the project dir:
lessc --include-path styles main/main.less
I get the following error:
> less parse exception: 'linked.less' wasn't found
in main/main.less at line 1
extract
@import 'linked';
With this debug message:
09:57:19.564 [DEBUG] reading @import linked.less
09:57:19.565 [DEBUG] resolving linked.less relative to <pathToProject>\lesscssbug\styles
It does work if I don't add the --include-path
but for the gradle build I have to add the sourceDir.
Thanks for fixing the other bug and also for providing an active project which uses the most recent version of less.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.