Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions techs/css-stylus.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* **Опции**
*
* * *String* **target** — Результирующий таргет. По умолчанию `?.css`.
* * *Array<String>* **sourceSuffixes** — Суффиксы файлов, из которых собирается таргет. По умолчанию — `['css', 'styl']`.
* * *Object* **variables** — Дополнительные переменные окружения для `stylus`.
* * *String* **filesTarget** — files-таргет, на основе которого получается список исходных файлов
* (его предоставляет технология `files`). По умолчанию — `?.files`.
Expand All @@ -29,14 +30,17 @@ module.exports = require('enb/lib/build-flow').create()
.defineOption('compress', false)
.defineOption('prefix', '')
.defineOption('variables')
.useFileList(['css', 'styl'])
.defineOption('sourceSuffixes', ['css', 'styl'])
.useSourceResult('filesTarget', '?.files')
.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 this._sourceSuffixes.indexOf(item.suffix) > -1;
}, this).map(function (file) {
var url = node.relativePath(file.fullname);

if (file.name.indexOf('.styl') !== -1) {
Expand Down