@@ -81,12 +81,12 @@ public Less175CompilerOptionsBuilder withSilent(final boolean silent) {
81
81
}
82
82
83
83
/**
84
- * Returns a command line argument which enables/disables logging compilation warnings.
85
- * @return the command line argument (never {@code null}).
84
+ * Returns a command line option which enables/disables logging compilation warnings.
85
+ * @return the command line option (never {@code null}).
86
86
* @since 2.0.0
87
87
* @see #withSilent(boolean)
88
88
*/
89
- protected String getSilentCompilerArgument () {
89
+ protected String getSilentCompilerOption () {
90
90
if (silent ) {
91
91
return "--silent" ;
92
92
} else {
@@ -108,12 +108,12 @@ public Less175CompilerOptionsBuilder withStrictImports(final boolean strictImpor
108
108
}
109
109
110
110
/**
111
- * Returns a command line argument which enables/disables strict imports.
112
- * @return the command line argument (never {@code null}).
111
+ * Returns a command line option which enables/disables strict imports.
112
+ * @return the command line option (never {@code null}).
113
113
* @since 2.0.0
114
114
* @see #withStrictImports(boolean)
115
115
*/
116
- protected String getStrictImportsCompilerArgument () {
116
+ protected String getStrictImportsCompilerOption () {
117
117
if (strictImports ) {
118
118
return "--strict-imports" ;
119
119
} else {
@@ -133,12 +133,12 @@ public Less175CompilerOptionsBuilder withCompress(final boolean compress) {
133
133
}
134
134
135
135
/**
136
- * Returns a command line argument which enables/disables a CSS code compression.
137
- * @return the command line argument (never {@code null}).
136
+ * Returns a command line option which enables/disables a CSS code compression.
137
+ * @return the command line option (never {@code null}).
138
138
* @since 2.0.0
139
139
* @see #withCompress(boolean)
140
140
*/
141
- protected String getCompressCompilerArgument () {
141
+ protected String getCompressCompilerOption () {
142
142
if (compress ) {
143
143
return "--compress" ;
144
144
} else {
@@ -159,11 +159,11 @@ public Less175CompilerOptionsBuilder withDepends(final boolean depends) {
159
159
160
160
/**
161
161
* TODO what is depends?
162
- * @return command line argument (never {@code null}).
162
+ * @return command line option (never {@code null}).
163
163
* @since 2.0.0
164
164
* @see #withDepends(boolean)
165
165
*/
166
- protected String getDependsCompilerArgument () {
166
+ protected String getDependsCompilerOption () {
167
167
if (depends ) {
168
168
return "--depends" ;
169
169
} else {
@@ -185,12 +185,12 @@ public Less175CompilerOptionsBuilder withIeCompatability(final boolean ieCompata
185
185
}
186
186
187
187
/**
188
- * Returns a command line argument which enables/disables compatibility with IE browser.
189
- * @return the command line argument (never {@code null}).
188
+ * Returns a command line option which enables/disables compatibility with IE browser.
189
+ * @return the command line option (never {@code null}).
190
190
* @since 2.0.0
191
191
* @see #withIeCompatability(boolean)
192
192
*/
193
- protected String getIeCompatabilityCompilerArgument () {
193
+ protected String getIeCompatabilityCompilerOption () {
194
194
if (ieCompatability ) {
195
195
return "" ;
196
196
} else {
@@ -211,12 +211,12 @@ public Less175CompilerOptionsBuilder withJavaScriptEnabled(final boolean javaScr
211
211
}
212
212
213
213
/**
214
- * Returns a command line argument which allows/disallows usage of JavaScript language.
215
- * @return the command line argument (never {@code null}).
214
+ * Returns a command line option which allows/disallows usage of JavaScript language.
215
+ * @return the command line option (never {@code null}).
216
216
* @since 2.0.0
217
217
* @see #withJavaScriptEnabled(boolean)
218
218
*/
219
- protected String getJavaScriptEnabledCompilerArgument () {
219
+ protected String getJavaScriptEnabledCompilerOption () {
220
220
if (javaScriptEnabled ) {
221
221
return "" ;
222
222
} else {
@@ -243,12 +243,12 @@ public Less175CompilerOptionsBuilder withIncludePaths(final List<String> include
243
243
}
244
244
245
245
/**
246
- * Returns a command line argument representation of the available include paths.
247
- * @return the command line argument (never {@code null}).
246
+ * Returns a command line option representation of the available include paths.
247
+ * @return the command line option (never {@code null}).
248
248
* @since 2.0.0
249
249
* @see #withIncludePaths(List)
250
250
*/
251
- protected String getIncludePathsCompilerArgument () {
251
+ protected String getIncludePathsCompilerOption () {
252
252
if (includePaths .isEmpty ()) {
253
253
return "" ;
254
254
}
@@ -278,12 +278,12 @@ public Less175CompilerOptionsBuilder withLineNumbers(final LineNumbersValue line
278
278
}
279
279
280
280
/**
281
- * Returns a command line argument which enables/disables generating inline source-mapping.
282
- * @return the command line argument (never {@code null}).
281
+ * Returns a command line option which enables/disables generating inline source-mapping.
282
+ * @return the command line option (never {@code null}).
283
283
* @since 2.0.0
284
284
* @see #withJavaScriptEnabled(boolean)
285
285
*/
286
- protected String getLineNumbersCompilerArgument () {
286
+ protected String getLineNumbersCompilerOption () {
287
287
if (lineNumbers == LineNumbersValue .DISABLED ) {
288
288
return "" ;
289
289
} else {
@@ -312,12 +312,12 @@ public Less175CompilerOptionsBuilder withRootPath(final String rootPath) {
312
312
}
313
313
314
314
/**
315
- * Returns a command line argument representation of the root path.
316
- * @return the command line argument (never {@code null}).
315
+ * Returns a command line option representation of the root path.
316
+ * @return the command line option (never {@code null}).
317
317
* @since 2.0.0
318
318
* @see #withRootPath(String)
319
319
*/
320
- protected String getRootPathCompilerArgument () {
320
+ protected String getRootPathCompilerOption () {
321
321
if (rootPath != null ) {
322
322
return "--rootpath=" + rootPath ;
323
323
} else {
@@ -340,25 +340,28 @@ protected String getRootPathCompilerArgument() {
340
340
* background-image: url('images/lamp-post.png');
341
341
* }
342
342
* </pre>
343
- *
343
+ * <p>
344
344
* this will output the following normally
345
+ * </p>
345
346
*
346
347
* <pre>
347
348
* .icon-1 {
348
349
* background-image: url('images/lamp-post.png');
349
350
* }
350
351
* </pre>
351
- *
352
+ * <p>
352
353
* but with this option on it will instead output
354
+ * </p>
353
355
*
354
356
* <pre>
355
357
* .icon-1 {
356
358
* background-image: url('files/images/lamp-post.png');
357
359
* }
358
360
* </pre>
359
- *
361
+ * <p>
360
362
* You may also want to consider using the {@code data-uri} function instead of this option, which will embed images
361
363
* into the CSS.
364
+ * </p>
362
365
* @param relativeUrls {@code true} whether the compiler should rewrite relative URLs, otherwise {@code false}.
363
366
* @return {@code this} builder.
364
367
* @since 2.0.0
@@ -369,12 +372,12 @@ public Less175CompilerOptionsBuilder withRelativeUrls(final boolean relativeUrls
369
372
}
370
373
371
374
/**
372
- * Returns a command line argument which enables/disables rewriting relative URLs.
373
- * @return the command line argument (never {@code null}).
375
+ * Returns a command line option which enables/disables rewriting relative URLs.
376
+ * @return the command line option (never {@code null}).
374
377
* @since 2.0.0
375
378
* @see #withRelativeUrls(boolean)
376
379
*/
377
- protected String getRelativeUrlsCompilerArgument () {
380
+ protected String getRelativeUrlsCompilerOption () {
378
381
if (relativeUrls ) {
379
382
return "--relative-urls" ;
380
383
} else {
@@ -391,8 +394,9 @@ protected String getRelativeUrlsCompilerArgument() {
391
394
* height: calc(100% - 10px);
392
395
* }
393
396
* </pre>
394
- *
397
+ * <p>
395
398
* will be processed currently.
399
+ * </p>
396
400
* <p>
397
401
* With strict math on, only maths that is inside unnecessary parenthesis will be processed. For instance.
398
402
* </p>
@@ -424,12 +428,12 @@ public Less175CompilerOptionsBuilder withStrictMath(final boolean strictMath) {
424
428
}
425
429
426
430
/**
427
- * Returns a command line argument which enables/disables strict math.
428
- * @return the command line argument (never {@code null}).
431
+ * Returns a command line option which enables/disables strict math.
432
+ * @return the command line option (never {@code null}).
429
433
* @since 2.0.0
430
434
* @see #withStrictMath(boolean)
431
435
*/
432
- protected String getStrictMathCompilerArgument () {
436
+ protected String getStrictMathCompilerOption () {
433
437
if (strictMath ) {
434
438
return "--strict-math=on" ;
435
439
} else {
@@ -446,11 +450,12 @@ protected String getStrictMathCompilerArgument() {
446
450
* property: 1px * 2px;
447
451
* }
448
452
* </pre>
449
- *
453
+ * <p>
450
454
* In this case, things are clearly not right - a length multiplied by a length gives an area, but CSS does not
451
455
* support specifying areas. So we assume that the user meant for one of the values to be a value, not a unit of
452
456
* length and Less outputs 2px. With strict units on, Less assumes this is a bug in the calculation and throw an
453
457
* error.
458
+ * </p>
454
459
* @param strictUnits {@code true} whether the compiler should guess units in the Less code when it does maths,
455
460
* otherwise {@code false}.
456
461
* @return {@code this} builder.
@@ -462,12 +467,12 @@ public Less175CompilerOptionsBuilder withStrictUnits(final boolean strictUnits)
462
467
}
463
468
464
469
/**
465
- * Returns a command line argument which enables/disables strict units.
466
- * @return the command line argument (never {@code null}).
470
+ * Returns a command line option which enables/disables strict units.
471
+ * @return the command line option (never {@code null}).
467
472
* @since 2.0.0
468
473
* @see #withStrictUnits(boolean)
469
474
*/
470
- protected String getStrictUnitsCompilerArgument () {
475
+ protected String getStrictUnitsCompilerOption () {
471
476
if (strictUnits ) {
472
477
return "--strict-units=on" ;
473
478
} else {
@@ -481,20 +486,20 @@ protected String getStrictUnitsCompilerArgument() {
481
486
* @since 2.0.0
482
487
*/
483
488
public Collection <Object > create () {
484
- final ListWithoutEmptyValuesBuilder arguments = new ListWithoutEmptyValuesBuilder ();
485
- arguments .add (getSilentCompilerArgument ());
486
- arguments .add (getStrictImportsCompilerArgument ());
487
- arguments .add (getCompressCompilerArgument ());
488
- arguments .add (getDependsCompilerArgument ());
489
- arguments .add (getIeCompatabilityCompilerArgument ());
490
- arguments .add (getJavaScriptEnabledCompilerArgument ());
491
- arguments .add (getIncludePathsCompilerArgument ());
492
- arguments .add (getLineNumbersCompilerArgument ());
493
- arguments .add (getRootPathCompilerArgument ());
494
- arguments .add (getRelativeUrlsCompilerArgument ());
495
- arguments .add (getStrictMathCompilerArgument ());
496
- arguments .add (getStrictUnitsCompilerArgument ());
497
- return arguments .create ();
489
+ final ListWithoutEmptyValuesBuilder options = new ListWithoutEmptyValuesBuilder ();
490
+ options .add (getSilentCompilerOption ());
491
+ options .add (getStrictImportsCompilerOption ());
492
+ options .add (getCompressCompilerOption ());
493
+ options .add (getDependsCompilerOption ());
494
+ options .add (getIeCompatabilityCompilerOption ());
495
+ options .add (getJavaScriptEnabledCompilerOption ());
496
+ options .add (getIncludePathsCompilerOption ());
497
+ options .add (getLineNumbersCompilerOption ());
498
+ options .add (getRootPathCompilerOption ());
499
+ options .add (getRelativeUrlsCompilerOption ());
500
+ options .add (getStrictMathCompilerOption ());
501
+ options .add (getStrictUnitsCompilerOption ());
502
+ return options .create ();
498
503
}
499
504
500
505
/**
0 commit comments