Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Use postcss.plugin() API #26

Open
cvrebert opened this issue Oct 1, 2015 · 11 comments
Open

Use postcss.plugin() API #26

cvrebert opened this issue Oct 1, 2015 · 11 comments

Comments

@cvrebert
Copy link
Contributor

cvrebert commented Oct 1, 2015

@pytkin
Copy link

pytkin commented Nov 27, 2015

What kind of help do you need?
If you have question(s) related with PostCSS, you can address them to @ai

@cvrebert
Copy link
Contributor Author

It's just a matter of finding the time. I don't anticipate any special difficulties.

@bassjobsen
Copy link

@cvrebert @ai i try to run the following command:
postcss --use mq4-hover-shim.postprocessorFor --mq4-hover-shim.postprocessorFor.hoverSelectorPrefix ".bs-true-hover " -o dist/css/bootstrap.css dist/css/bootstrap.css
Do i use the wrong command or does it not work? Thanks.

@cvrebert
Copy link
Contributor Author

Doubt it would work, because of this issue.

@bassjobsen
Copy link

@ai as far i do understand --use mq4-hover-shim.postprocessorFor calls require('./q4-hover-shim.postprocessorFor'); in stead of var plugin = require('./q4-hover-shim'); plugin.postprocessorFor(). How should this be solved?

@cvrebert
Copy link
Contributor Author

@bassjobsen mq4-hover-shim doesn't yet implement the plugin interface expected by postcss. PostCSS is not at fault.

@bassjobsen
Copy link

Hi @cvrebert yes i have seen that. But when using --use mq4-hover-shim.postprocessorFor i got Error: Cannot find module 'mq4-hover-shim.postprocessorFor' so the wrong interface is never reached in the first place.

@cvrebert cvrebert self-assigned this Dec 14, 2015
@cvrebert
Copy link
Contributor Author

postcss-cli is maintained by other folks, not by ai.

@bassjobsen
Copy link

yes, i see now. So @pirxpilot can you help?

@pirxpilot
Copy link

Not sure how I can help: as soon as mq4-hover-shim implements standard plugin interface it should work with postcss-cli and other runners without any problems.

@bassjobsen
Copy link

Hi @pirxpilot thanks for your quick response. Yes i do understand the plugin interface should be implement here: https://github.com/twbs/mq4-hover-shim/blob/master/src/nodejs/postprocessor.js#L72 Currently i found the problem at https://github.com/twbs/mq4-hover-shim/blob/master/src/nodejs/index.js#L9. The preceding means on should use nd --use mq4-hover-shim.postprocessorFor which seems non possible. Or should mq4-hover-shim refactor the index.js too?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants