LessOptions class

Constructors

LessOptions()

Properties

Filename for the banner text - Not official option
read / write
chunkInput ↔ bool
Whether to chunk input. more performant but causes parse issues.
read / write
cleanCss ↔ bool
read / write
cleancssOptions ↔ CleancssOptions
read / write
color ↔ bool
color output in the terminal, for error messages
read / write
compress ↔ bool
Compress using less built-in compression. This does an okay job but does not utilise all the tricks of dedicated css compression.
read / write
depends ↔ bool
Outputs a makefile import dependency list to stdout
read / write
dumpLineNumbers ↔ String
Whether to dump line numbers: 'comments', 'mediaquery' or 'all'
read / write
filename ↔ String
read / write
globalVariables ↔ List<VariableDefinition>
Effectively the declaration is put at the top of your base Less file, meaning it can be used but it also can be overridden if this variable is defined in the file. Defines a variable list that can be referenced by the file
read / write
ieCompat ↔ bool
Compatibility with IE8. Used for limiting data-uri length
read / write
importMultiple ↔ bool
whether we are currently importing multiple copies
read / write
input ↔ String
Input filename or '-' for stdin
read / write
inputBase ↔ String
read / write
insecure ↔ bool
Allow Imports from Insecure HTTPS Hosts
read / write
javascriptEnabled ↔ bool
whether JavaScript is enabled. Dart version don't evaluate JavaScript
read / write
lint ↔ bool
Runs the less parser and just reports errors without any output.
read / write
logger ↔ Logger
read / write
logLevel ↔ int
read / write
math ↔ int
How to process math
read / write
maxLineLen ↔ int
max-line-len - deprecated
read / write
mime ↔ String
Browser only - mime type for sheet import
read / write
modifyVariables ↔ List<VariableDefinition>
As opposed to the global variable option, this puts the declaration at the end of your base file, meaning it will override anything defined in your Less file.
read / write
numPrecision ↔ int
Default Numeric precision
read / write
output ↔ String
Output filename
read / write
outputBase ↔ String
read / write
parseError ↔ bool
read / write
paths ↔ List<String>
Sets available include paths. If the file in an @import rule does not exist at that exact location, less will look for it at the location(s) passed to this option. You might use this for instance to specify a path to a library which you want to be referenced simply and relatively in the less files.
read / write
pluginLoader PluginLoader
read / write
pluginManager PluginManager
read / write
pluginRe ↔ RegExp
read / write
plugins ↔ List<Plugin>
read / write
processImports ↔ bool
Whether to process imports. if false then imports will not be imported
read / write
rewriteUrls ↔ int
By default URLs are kept as-is, so if you import a file in a sub-directory that references an image, exactly the same URL will be output in the css. This option allows you to re-write URL's in imported files so that the URL is always relative to the base imported file
read / write
rootpath ↔ String
Allows you to add a path to every generated import and url in your css. This does not affect less import statements that are processed, just ones that are left in the output css.
read / write
showTreeLevel ↔ int
read / write
silent ↔ bool
whether to swallow errors and warnings
read / write
sourceMap ↔ bool
whether to output a source map
read / write
sourceMapOptions SourceMapOptions
All necessary information for source map
read / write
strictImports ↔ bool
The strictImports controls whether the compiler will allow an @import inside of either @media blocks or (a later addition) other selector blocks. See: https://github.com/less/less.js/issues/656 Forces evaluation of imports
read / write
strictUnits ↔ bool
Without this option, less attempts to guess at the output unit when it does maths.
read / write
syncImport ↔ bool
Whether to import synchronously
read / write
urlArgs ↔ String
This option allows you to specify a argument to go on to every URL.
read / write
useFileCache ↔ bool
Browser only - whether to use the per file session cache
read / write
variables ↔ Map<String, Node>
Allows setting variables with a hash. Example: variables = {'my-color': new Color.fromKeyword('red')};
read / write
verbose ↔ bool
Whether to log more activity
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

checkArgFunc(String command, String option) → bool
Check the command has a argument
checkBooleanArg(String arg) → bool
Checks the argument is yes/no or equivalent, returning true/false if not boolean returns null
clone() LessOptions
definePlugin(String name, Plugin plugin, { bool load: false, String options: '' }) → void
Define a custom plugin named name and load it if load is true [...]
exitError(String message) → bool
exit with error message
fromCommandLine(String line) → bool
Add space delimited options. [...]
parse(Match arg) → bool
Update less options from arg [...]
parseVariableOption(String option, List<VariableDefinition> variables) → void
printUsage() → void
Show help
setParseError([String option ]) → bool
validate() → bool
check options combinations
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited