-
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
Added tests for stylus cases #61
Conversation
c6867d1
to
e764f62
Compare
bda82d4
to
fdf563f
Compare
@blond update PR |
@@ -51,12 +51,18 @@ | |||
"vow": "0.4.9" | |||
}, | |||
"devDependencies": { | |||
"bower": "^1.3.12", |
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.
Только точные зависимости.
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.
ok
Нужно отребейзить от |
.defineOption('imports', 'include') | ||
.defineOption('sourcemap', false) | ||
.defineOption('autoprefixer', false) | ||
.defineOption('compress') |
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.
У compress
потерялся явный false
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.
ok
@@ -7,13 +7,26 @@ | |||
* **Опции** | |||
* | |||
* * *String* **target** — Результирующий таргет. По умолчанию `?.css`. | |||
* * *Object* **variables** — Дополнительные переменные окружения для `stylus`. | |||
* * *Bool* **comments** — Добавляет разделяющие комментарии между стилями, содержащие относительный путь до блока. |
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.
Bool
- какое-то странное сокращение. Нужно везде поменять на Boolean
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.
ok
'display:-ms-flexbox;' + | ||
'display:flex;' + | ||
'}', | ||
browsersConfig = ['Explorer 10', 'Chrome > 30', 'Firefox > 21', 'Opera 12']; |
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.
Сложновато для теста.
Я бы выбрал какую-то версию IE, которая никогда не будет меняться, чтобы тест не протухал.
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.
Пока IE10 оторвет префикс, enb-stylus
10 раз перепишется :) Но я бы вообще оставил для теста только Хром
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.
Давайте все таки оставим осла, потому новые версии хрома слишком быстро появляются и информация о старых версиях в браузерлисте будет исчезать.
@tavriaforever Написал вопросы и замечания. |
} | ||
) | ||
.spread(function (source) { | ||
var s = mockHelperFs.normalizeFile(source), |
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.
я против таких переменных!
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.
изменил
@tavriaforever я всё |
Обновил PR |
* | ||
* * *Boolean* **compress** – Минифицирует результат рендеринга stylus, по умолчанию `false` | ||
* | ||
* * *String* **prefix** – Добавляет префикс ко всем css классам, по умолчанию `false` |
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.
Так баг есть для css файлов или нет?
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.
Нет бага. Если импорт css оставляем как есть, префикс там никак и не добавятся, так как импорт это лишь ссылка на исходный файл.
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.
Значит есть баг :) Файлы блоков могут быть c css
расширением.
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.
Как можно добавить префиксы в импорте? )) Если стилус раскроет css – тогда он туда префиксы добавит.
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.
С помощью postcss
. Стайлус не раскрывает CSS-файлы, это делает postcss
.
Тесты падают из-за сломаного кодстайла. |
Написал ещё немного замечаний |
Added tests for stylus cases
#36
To fix need to implement options:
Variables option #53varibles
includes
Includes option #54comments
Comments options #55hoist
Hoist option #56Imports
Imports option #57url
Url option #58