mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-22 19:02:15 +00:00
Added back stylus utils
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
ba3dcb22a1
commit
b586a32d00
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@ module/
|
|||||||
node_modules/
|
node_modules/
|
||||||
*.mjs
|
*.mjs
|
||||||
*.js
|
*.js
|
||||||
|
!src/dzeio/stylusUtils.js
|
||||||
*.d.ts
|
*.d.ts
|
||||||
!src/stylus.d.ts
|
!src/stylus.d.ts
|
||||||
!.storybook/*.js
|
!.storybook/*.js
|
||||||
|
11
src/dzeio/stylusUtils.js
Normal file
11
src/dzeio/stylusUtils.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
// See https://github.com/stylus/stylus/issues/1872#issuecomment-86553717
|
||||||
|
var stylus = require('stylus');
|
||||||
|
|
||||||
|
module.exports = function() {
|
||||||
|
return function(style) {
|
||||||
|
style.define('file-exists', function(path) {
|
||||||
|
return !!stylus.utils.lookup(path.string, this.paths);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user