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

Up stylus to 0.52.0 #91

Merged
merged 1 commit into from
Jul 20, 2015
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"postcss": "4.1.11",
"postcss-import": "5.2.2",
"postcss-url": "3.2.0",
"stylus": "0.51.1",
"stylus": "0.52.0",
"vow": "0.4.9"
},
"devDependencies": {
Expand Down
7 changes: 4 additions & 3 deletions techs/stylus.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ module.exports = require('enb/lib/build-flow').create()
.set('hoist atrules', this._hoist);

// rebase url() in all cases on stylus level
if (['rebase', 'inline'].indexOf(this._url) > -1) {
// need to rebase url()
if (['rebase', 'inline'].indexOf(this._url) !== -1) {
// only rebase url() on stylus level
renderer
.set('resolve url', true)
.define('url', stylus.resolver());
// set `nocheck` for fixed github.com/stylus/stylus/issues/1951
.define('url', stylus.resolver({ nocheck: true }));
}

if (this._includes) {
Expand Down
2 changes: 1 addition & 1 deletion test/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "enb-stylus-fixtures",
"private": true,
"dependencies": {
"stylus": "stylus/stylus#0.51.1"
"stylus": "stylus/stylus#0.52.0"
}
}
9 changes: 5 additions & 4 deletions test/stylus-native-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ var fs = require('fs'),
'object',
'operators',

// @namespace buggy remove after @import in stylus file
// https://github.com/stylus/stylus/issues/1921
'atrules',
// skip this test, because on BEM project we don't need to check
// for the file while you override links on stylus
// for history: https://github.com/stylus/stylus/issues/1951
'import.include.resolver.nested',

// The skipped tests cases for which written tests inside the package enb-stylus.
// It need to take into account the work stylus + postcss
Expand Down Expand Up @@ -84,7 +85,7 @@ addSuite('cases', readDir(stylusDir + '/cases', '.styl'), function (test, done)
comments: false,
imports: (test.indexOf('include') !== -1 || test.indexOf('import.include.resolver.css-file') !== -1) &&
'include',
url: (test.indexOf('resolver') !== -1 && 'rebase') || test.indexOf('functions.url') !== -1 && 'inline'
url: test.indexOf('resolver') !== -1 && 'rebase' || test.indexOf('functions.url') !== -1 && 'inline'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше бы вторую половину тоже в скобки взял - читаемость лучше

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ок

}
)
.spread(function (source) {
Expand Down