-
Notifications
You must be signed in to change notification settings - Fork 18
Icss utils #105
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
Icss utils #105
Conversation
src/icss.js
Outdated
.append(declarations) | ||
} | ||
|
||
export const createICSSRules = (imports, exports) => [ |
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.
let's stick to one syntax of modules? commonjs or imports?
src/index.js
Outdated
@@ -105,12 +79,10 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( | |||
}) | |||
|
|||
/* If we have no definitions, don't continue */ | |||
if (Object.keys(definitions).length === 0) return | |||
if (Object.keys(exports).length === 0) return |
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.
I also would like to suggest to use icssExports
as the variable name instead of plain exports
, cause sometimes it can not be easy to distinguish icss exports from module.exports.
and maybe fix the comment or remove it :)
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.
Super, thank you! 👍
/cc @sullenor
In the next PR I'd like to isolate alias indexing in one call.