Socket
Book a DemoInstallSign in
Socket

@abmaonline/parse-less-import

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abmaonline/parse-less-import

Parse import from less file

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@abmaonline/parse-less-import

NPM version node License npm download

Parse import from less file

Originally created by LingyuCoder, but no longer available on github and made some changes to make it work with older versions of less.

Node.js >= 6

Install

$ npm install --save @abmaonline/parse-less-import

Usage

const parse = require('@abmaonline/parse-less-import');

const content = `
@import '../a';
@import './b.less';
@import (multiple) './c.less';
@import (multiple, reference) './d.less';
`;

parse(content);
/*
[ { path: '../a', keywords: [] },
  { path: './b.less', keywords: [] },
  { path: './c.less', keywords: [ 'multiple' ] },
  { path: './d.less', keywords: [ 'multiple', 'reference' ] } ]
*/

Test

$ npm run test
$ npm run test-cov

Keywords

less

FAQs

Package last updated on 07 Jun 2020

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