mishal/iless-plugin-custom-import

ILess plugin for custom imports

1.0.0 2015-09-14 14:49 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:14:27 UTC


README

Allows to create custom schema like import directives for LESS. Inspired by less-plugin-custom-import.

Build Status

Build Status

Installation

Install using composer:

$ composer require mishal/iless-plugin-custom-import

Programmatic Usage

use ILess\Parser;
use ILess\Plugin\CustomImport\Plugin;

$directories = [
    'foo' => '/path/foo',
    'some-vendor-library-path' => '/path1/some-vendor',
];

$parser = new Parser();
// register the plugin
$parser->getPluginManager()->addPlugin(new Plugin($directories));

// now I can use schema like directives in my less
$parser->parseFile('/example.less');

$css = $parser->getCSS();

Less Code – Example.less

@import 'foo://import.less';
@import (optional) 'foo://icons.less';
@import (reference) 'some-vendor-library-path://subdir/foo.less';

Usage From the Command Line

Not supported.