manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CONNECTORS-1418) Develop Ant build script to compile LESS to CSS
Date Wed, 26 Apr 2017 20:11:04 GMT

    [ https://issues.apache.org/jira/browse/CONNECTORS-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985448#comment-15985448
] 

Karl Wright edited comment on CONNECTORS-1418 at 4/26/17 8:10 PM:
------------------------------------------------------------------

Hi [~kishorekumar], this looks like the right Maven plugin to use:

https://github.com/marceloverdijk/lesscss-maven-plugin

The Maven configuration looks like this:

{code}
<plugin>
    <groupId>org.lesscss</groupId>
    <artifactId>lesscss-maven-plugin</artifactId>
    <version>1.7.0.1.1</version>
    <configuration>
        <sourceDirectory>${project.basedir}/src/main/webapp/less</sourceDirectory>
        <outputDirectory>${project.build.directory}/${project.build.finalName}/css</outputDirectory>
        <compress>true</compress>
        <includes>
            <include>main.less</include>
        </includes>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>
{code}

This looks like it would compile all source files under the webapp/less source directory to
the target css directory.

For a start, therefore, I recommend keeping the layout of the src/main/webapp files and folders
to conform with the standard convention (http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html),
and modifying the pom to include the lesscss-maven-plugin invocation as specified.  Remove
the style.css file and see if it gets generated and included in the right place in the war
when you use Maven to build.

I'll keep looking for an ant plugin we can use.



was (Author: kwright@metacarta.com):
Hi [~kishorekumar], this looks like the right Maven plugin to use:

https://github.com/marceloverdijk/lesscss-maven-plugin

The Maven configuration looks like this:

{code}
<plugin>
    <groupId>org.lesscss</groupId>
    <artifactId>lesscss-maven-plugin</artifactId>
    <version>1.7.0.1.1</version>
    <configuration>
        <sourceDirectory>${project.basedir}/src/main/webapp/less</sourceDirectory>
        <outputDirectory>${project.build.directory}/${project.build.finalName}/css</outputDirectory>
        <compress>true</compress>
        <includes>
            <include>main.less</include>
        </includes>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>
{code}

This looks like it would compile all source files under the webapp/less source directory to
the target/css directory.

For a start, therefore, I recommend rearranging the layout of the src/main/webapp files and
folders to conform with this general convention.  Do the .less files need to be in the final
war?  If not, we may want to move them out entirely, for example to some place like src/main/less.

I'll keep looking for an ant plugin we can use.


> Develop Ant build script to compile LESS to CSS
> -----------------------------------------------
>
>                 Key: CONNECTORS-1418
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1418
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Framework core
>    Affects Versions: ManifoldCF 2.7
>            Reporter: Kishore Kumar
>            Assignee: Kishore Kumar
>
> We need to add Ant build script to compile LESS files to CSS.
> Currently the compilation is dependent on Intellij IDE Less plugin.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message