support @import options
jonschlinkert opened this issue · comments
Add support for @import
options: less|css|multiple|once|inline|mute
. I'm not sure if this should be done in the require
option or elsewhere.
Maybe we change the require
option to imports
(not import
)? And then augment that option with the import options somehow?
options: {
imports: [
'globals/variables.less',
'globals/mixins.less',
'(mute) bootstrap.less'
]
}
Actually I think we should extend the imports
object and have the imports[option] map directly to the options in the Less parser:
options: {
imports: {
less: [
'globals/variables.less',
'globals/mixins.less'
],
mute: {
'bootstrap.less'
}
}
}
These are less options... I'm not sure how this would work in the grunt plugin. If the less file already has an @import
then it will do that, won't it?
We were making it possible to require less files for packaging components in different ways, without having to include the @import
option in the less files themselves. I can understand giving an option to say if it's a less or css file, but I'm not sure how the other options would work.
Update. I implemented this and got it working well, but we need to implement better tests before I add more features.
released