Skip to content

Dalee/less-plugin-resolve-blocks

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

less-plugin-resolve-blocks

Build Status

Simple file management plugin to resolve blocks inside less-files.

Consider having two files:

// blocks/b-main/b-main.less:
@nice-blue: #5B83AD;


// blocks/b-text/b-text.less:
@import "block:b-main";

p {
	color: @nice-blue;
}

When plugin finds import pattern like block:something it starts going up the tree trying to find folder something on each level above.

Once the folder is found and there's something.less inside it, @import will be resolved into it.

Installation

$ npm install -g less-plugin-resolve-blocks

Usage

$ lessc file.less --plugin=less-plugin-resolve-blocks

About

Simple less plugin to resolve blocks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published