assemble / assemble-less

Grunt task for compiling LESS to CSS. This task does for less what Assemble does for HTML, making it much easier to modularize and reduce repetition in stylesheets.
http://github.com/assemble/assemble/
MIT License
66 stars 20 forks source link

support @import options #4

Closed jonschlinkert closed 11 years ago

jonschlinkert commented 11 years ago

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'
    }
  }
}
doowb commented 11 years ago

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.

jonschlinkert commented 11 years ago

Update. I implemented this and got it working well, but we need to implement better tests before I add more features.

jonschlinkert commented 11 years ago

released