-
Notifications
You must be signed in to change notification settings - Fork 45
Command Line Options
SomMeri edited this page Oct 29, 2012
·
17 revisions
Less4j can run as a standalone program. Latest complete jar with all dependencies is stored in downloads page. Command line version can run in two modes:
- single input file mode,
- multiple input files mode.
Less4j uses single file mode by default.
Less4j expects one or two arguments. First one contains input less filename and the second one contains the output css filename. If the output file argument is not present, less4j will print the result into standard output.
Must be turned on by '-m' or '--multiMode' parameter. Less4j assumes that all input files are less files. All are going to be compiled into css files. Each input file will generate an output file with the same name and suffix '.css'.
Usage: less4j [options] [list of files]
- -v, --version Print version. Default: false
- -h, --help: Print help screen. Default: false
- -m, --multiMode: Turn on multi less files mode. Default: false
- -o, --outputDir: Specify the output directory. If not present, Less4j will place output files into current directory. This option is available only in multiple files mode.
- Compile 'test.less' file and print the result into standard output:
java -jar less4j.jar test.less - Compile 'test.less' file and print the result into 'test.css' file:
java -jar less4j.jar test.less test.css - Compile 't1.less', 't2.less' and 't3.less' files into 't1.css', 't2.css' and 't3.css':
java -jar less4j.jar -m t1.less t2.less t3.less - Compile 't1.less', 't2.less', 't3.less' files into 't1.css', 't2.css', 't3.css'. Place the result
into '..\css' directory:
java -jar less4j.jar -m -o ..\css\ t1.less t2.less t3.less