I'm making a library containing some generic UI components, some kind of Bootstrap. Suppose I have the following LESS files structure:
button.less
checkbox.less
index.less
variables.less
Each component style file has @import "variables.less";
. Index file imports all components files. Now I would like to distribute library.less and variables.less files into a package.
How do I bundle the index file? I used to concatenate all the files and remove repeated @import "variables";
line using regexps, maybe there is a Less API for doing this.