Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-contrib-less

Package Overview
Dependencies
Maintainers
7
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-less

Compile LESS files to CSS

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created

What is grunt-contrib-less?

The grunt-contrib-less package is a Grunt plugin that compiles LESS files to CSS. It provides a variety of options to customize the compilation process, such as specifying source maps, compressing the output, and including additional paths for @import directives.

What are grunt-contrib-less's main functionalities?

Basic Compilation

This feature allows you to compile LESS files into CSS. The 'paths' option specifies directories to scan for @import directives.

{
  "less": {
    "development": {
      "options": {
        "paths": ["assets/css"]
      },
      "files": {
        "path/to/result.css": "path/to/source.less"
      }
    }
  }
}

Source Maps

This feature enables the generation of source maps, which help in debugging by mapping the compiled CSS back to the original LESS source.

{
  "less": {
    "development": {
      "options": {
        "sourceMap": true,
        "sourceMapFilename": "path/to/result.css.map",
        "sourceMapURL": "result.css.map"
      },
      "files": {
        "path/to/result.css": "path/to/source.less"
      }
    }
  }
}

Compression

This feature allows you to compress the output CSS, reducing file size for production environments.

{
  "less": {
    "production": {
      "options": {
        "compress": true
      },
      "files": {
        "path/to/result.min.css": "path/to/source.less"
      }
    }
  }
}

Custom Functions

This feature allows you to define custom functions that can be used within your LESS files.

{
  "less": {
    "development": {
      "options": {
        "functions": {
          "add": function(less, a, b) {
            return a + b;
          }
        }
      },
      "files": {
        "path/to/result.css": "path/to/source.less"
      }
    }
  }
}

Other packages similar to grunt-contrib-less

Keywords

FAQs

Package last updated on 21 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc