Skip to content

Can I change the root path for compilation? #327

@charlievaughan-zz

Description

@charlievaughan-zz

We are using LESS with Adobe Experience Manager (AEM) which will compile the LESS files when they are pushed into a local instance (which is the normal way of doing things).

But with AEM you have little visibility of whether the AEM LESS compiler has thrown an error due to invalid LESS.

So we want to compile a copy of our less outside AEM as part of a Grunt pipeline just to keep an eye on LESS compilation issues as they occur.

The issue is with the paths used to import LESS style-sheets which are like so:

@import "/etc/designs/pdc/clientlibs_base/css/global/imports.less";

Meanwhile Grunt is run from the root directory which would require the import paths to be:

root/app/jcr_root/etc/designs/pdc/clientlibs_base/css/global/imports.less

So while the paths used to import the LESS files all work fine once pushed into AEM, they error when compiled from the root directory.

So the question is how we could go about configuring grunt-contrib-less to use a relative path or technique to compile from the root directory?

There seems to be several options that can be configured that might solve our issue, but without some examples its difficult to tell.

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions