All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.sommeri.less4j.commandline.Arguments Maven / Gradle / Ivy

Go to download

Less language is an extension of css and less4j compiles it into regular css. It adds several dynamic features into css: variables, expressions, nested rules. Less4j is a port. The original compiler was written in JavaScript and is called less.js. The less language is mostly defined in less.js documentation/issues and by what less.js actually do. Links to less.js: * home page: http://lesscss.org/ * source code & issues: https://github.com/cloudhead/less.js

There is a newer version: 1.17.2
Show newest version
package com.github.sommeri.less4j.commandline;

import java.util.ArrayList;
import java.util.List;

import com.beust.jcommander.Parameter;

public class Arguments {
  @Parameter(description = "[list of files]", required=true)
  private List files = new ArrayList();

  public List getFiles() {
    return files;
  }
  
  @Parameter(names = {"-h", "--help"}, help = true, description="Print this help screen.")
  private boolean help;

  @Parameter(names = {"-v", "--version"}, help = true, description="Print version.")
  private boolean version;

  @Parameter(names={"-m", "--multiMode"}, description="Turn on multi less files mode.")
  private boolean multiMode;
  
  @Parameter(names={"-sm", "--sourceMap"}, description="Generate source map.")
  private boolean sourceMap;

  @Parameter(names={"-x", "--compress"}, description="Turn on css output compression.")
  private boolean compressing;

  @Parameter(names={"-o", "--outputDir"}, description="Specify the output directory. If not present, Less4j will place output files into current directory. This option is available only in multiple files mode.")
  private String outputDirectory;

  @Parameter(names={"-pi", "--printIncorrect"}, description="Print result of syntactically incorrect input file. If not present, syntactically incorrect input files produce no result. If present, less4j prints whatever came out of the compilation as a compilation result - most likely an invalid CSS. ")
  private boolean printIncorrect;

  public boolean isHelp() {
    return help;
  }

  public boolean isMultiMode() {
    return multiMode;
  }

  public boolean isSourceMap() {
    return sourceMap;
  }

  public boolean isCompressing() {
    return compressing;
  }

  public String getOutputDirectory() {
    return outputDirectory;
  }

  public boolean isVersion() {
    return version;
  }
  
  public boolean isPrintIncorrect() {
    return printIncorrect;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy