-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fix: take into account levels order #52
Conversation
Hi! What problem fixes this PR and how to reproduce it? |
@andrewblond, при наличии в проекте css и styl не учитывается порядок уровней переопределения, технология клеит файлы по суффиксам(расширениям): сначала css, затем styl. |
.builder(function (sourceFiles) { | ||
var node = this.node, | ||
filename = node.resolvePath(path.basename(this._target)), | ||
defer = vow.defer(), | ||
css, renderer; | ||
|
||
css = sourceFiles.map(function (file) { | ||
css = sourceFiles.items.filter(function (item) { | ||
return ['css', 'styl'].indexOf(item.suffix) > -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот массив нужно брать из опции sourceSuffixes
.
вынес суффиксы в опцию |
@@ -29,14 +30,17 @@ module.exports = require('enb/lib/build-flow').create() | |||
.defineOption('compress', false) | |||
.defineOption('prefix', '') | |||
.defineOption('variables') | |||
.useFileList(['css', 'styl']) | |||
.defineOption('source', ['css', 'styl']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чтобы не сломать обратную совместимость и ради консистентности среди других технологий, нужно назвать sourceSuffixes
: https://github.com/enb-make/enb/blob/master/lib/build-flow.js#L133.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Выяснили, что проблема в ядре — enb/enb#232 и базовых технологиях — enb/enb-bem-techs#129. Закрываю Pull Request, проблема решится, когда будут исправлены проблемы в ядре. |
No description provided.