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

the proof of concept about the new plugins API #56

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

the proof of concept about the new plugins API #56

wants to merge 11 commits into from

Conversation

mightyaleksey
Copy link
Member

Hi, I made a small demo of usage of the new plugins API which I want to make public. The current implementation for the css-modulesify isn't production ready but it's a working demo to show that is possible :)

Still it requires param validation and I'm not sure about generateShortName and generateLongName.

Currently if you provide the custom generateScopedName function for the scope plugin - you'll get absolute paths to the source files instead of relatives (it's a feature! :)), but it results in the long generic classnames names if you use predefined functions generateShortName and generateLongName.
So, to make it work, I think those functions should build relative paths manually or as alternative way it is possible to use webpack patterns.


plugins = plugins.concat(new Parser({fetch: fetch}));

return postcss(plugins);
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to move that file to the public module

@joshwnj
Copy link
Member

joshwnj commented Nov 19, 2015

Hey @sullenor I like the direction you've taken here. What other things do you think need to be done before this is ready? Anything I can help with?

@mightyaleksey
Copy link
Member Author

Hey @joshwnj I think I'll make another pr to the loader-core on the weekend and we can try to adopt gulp plugin to the new version. I want to try another pattern and I hope it will be slightly better.

I also tried that version on a real project and unfortunately failed :( I had small issue with postcss-url, but I haven't figured it out what was the problem. I was short on time, so I moved to webpack :)
Anyways, if you'll find some time to try the new version on the real project - that would be nice. The main task here is to check how it would work with additional plugins.

Thanks

@mightyaleksey
Copy link
Member Author

@joshwnj I made a pr to the loader-core and updated current pr. It's not a final solution but it's a good starting point for improving css-modulesify :)

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

Successfully merging this pull request may close these issues.

2 participants