Socket
Socket
Sign inDemoInstall

less-compile-file

Package Overview
Dependencies
91
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    less-compile-file

Compiling LESS file to CSS


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
7.94 MB
Created
Weekly downloads
 

Readme

Source

less-compile-file (npm)

npm version

:hammer: Compiling LESS file to CSS

Usage

$ npm install less-compile-file
let compiler = require('less-compile-file');

compiler('file.less', 'file.css')
    .catch((err) => {
        console.error(err);
    })
    .then((results) => {
        console.log('Compiling completed.');
        console.log(results.source);
        console.log(results.destination);
        console.log(results.code);
    });

History

I use less-compiler package for compiling LESS file, but I have an error:

node_modules/less/lib/less/parser/parser.js:117
            imports.contents[fileInfo.filename] = str;
                   ^

TypeError: Cannot read property 'contents' of undefined
    at Object.parse (node_modules/less/lib/less/parser/parser.js:117:20)
    at Object.fromSource (node_modules/less-compiler/less-compiler.js:36:19)
    at node_modules/less-compiler/less-compiler.js:53:23
    at tryToString (fs.js:426:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:413:12)

Development

$ npm install
$ npm test

Try run file (which compile CSS files) with debug flag in example:

$ DEBUG=* node style-compiler.js

License

The MIT License @ 2017

Keywords

FAQs

Last updated on 16 Jan 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc