mishal / iless-plugin-custom-import
ILess plugin for custom imports
1.0.0
2015-09-14 14:49 UTC
Requires
- mishal/iless: ~2.0
This package is not auto-updated.
Last update: 2024-10-26 18:59:56 UTC
README
Allows to create custom schema like
import directives for LESS. Inspired by less-plugin-custom-import.
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.