Compare commits

..

2 Commits

Author SHA1 Message Date
0b60fa84ba v0.5.1 2021-03-29 14:07:38 +02:00
b586a32d00 Added back stylus utils
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-29 14:07:07 +02:00
3 changed files with 13 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@ module/
node_modules/
*.mjs
*.js
!src/dzeio/stylusUtils.js
*.d.ts
!src/stylus.d.ts
!.storybook/*.js

View File

@ -1,6 +1,6 @@
{
"name": "@dzeio/components",
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",
"main": "./src/index.mjs",
"types": "./src/index.d.ts",

11
src/dzeio/stylusUtils.js Normal file
View 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);
});
};
};