For instance if you are compiling a file in the less-files directory but the source files will be available on your web server in the root or current directory, you can specify this to remove the additional less-files part of the path Source Map Less Inline lessc -source-map-less-inline This is the opposite of the rootpath option, it specifies a path which should be removed from the output paths. Source Map Basepath lessc -source-map-basepath=less-files/ So for the option above you might have output.css Use this option if for instance you have a css file generated in the root on your web server but have your source less/css/map files in a different folder. Specifies a rootpath that should be prepended to each of the less file paths inside the sourcemap and also to the path to the map file specified in your output css. Source Map Rootpath lessc -source-map-rootpath=dev-files/ If you have the sourcemap option without a filename it will use the source less file name but with the extension map. Source Map Output Filename lessc -source-map The default options are the safest, so are IE8 compatible. Clean CSS Options lessc -clean-css -clean-option=-selectors-merge-mode:ie8 -clean-option=-advanced Note - it does not yet support sourcemaps, for that you can only use our own compression. Clean CSS lessc -clean-cssĬlean CSS is our minifer of choice if you want to get the most minified you can. Please feel free to improve our compressed output with a pull request. This does an okay job but does not utilise all the tricks of dedicated css compression. Silent lessc -sĪllow imports from insecure https hosts lessc -insecureĬompress using less built-in compression. Runs the less parser and just reports errors without any output. In node, set a paths option Ĭurrently only used for the data-uri function to ensure that images aren't created that are too large for the browser to handle. 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. Use this to configure a list of paths which less will use to find imports in. Include paths lessc -include-path=PATH1 PATH2 Prints a help message with available options and exits. # compile bootstrap.less to bootstrap.css and minify (compress) the result Examples # compile bootstrap.less to bootstrap.css If source is set to `-' (dash or hyphen-minus), input is read from stdin. The binary included in this repository, bin/lessc works with Node.js on *nix, OSX and Windows. The specified git URL may be that of the official lessc repo or a fork. This will guarantee that your project always uses that exact version of lessc. If you want to install a bleeding-edge, unpublished version of lessc, follow the instructions for specifying a git URL as a dependency and be sure to specify an actual commit SHA (not a branch name) as the commit-ish. Installing an unpublished development version of lessc Since patch releases are non-breaking we will publish patch releases immediately and alpha/beta/candidate versions will be published as minor or major version upgrades (we endevour since 1.4.0 to follow semantic versioning). These builds will not be published as a official release, and will typically have a build number or alpha/beta/release candidate designation. Periodically, as new functionality is being developed, lessc builds will be published to npm, tagged as. This is good, as new patch releases of the latest version will be installable by npm. Note that a tilde version range will be automatically specified in package.json. This will install the latest official version of lessc in your project folder, also adding it to the devDependencies in your project's package.json. Installing for node developmentĪlternatively if you don't use the compiler globally, you may be after npm i less -save-dev For a specific version (or tag) you can add after our package name, e.g. Installing lessc for use globallyĪnd then you will have the lessc command available globally. Heads up! If the command line isn't your thing, learn more about GUIs for Less. Edit the markdown source for "command-line-usage"Ĭompile.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |