Code Monkey home page Code Monkey logo

lesscss's People

Contributors

houbie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lesscss's Issues

Bug when importing less files with more than one ../

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:
lesscssstructure

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.

relative imports in subdirectories of a directory added via --include-path

For the following structure:
lesscssgradlestructure

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.