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 new API #59

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

the new API #59

wants to merge 6 commits into from

Conversation

mightyaleksey
Copy link
Member

Still, I need to fix trace, but I hope this variant should be better.

@mightyaleksey
Copy link
Member Author

@geelen Can you enlighten me about the destination of the "trace" variable? I figured out, that it should help to predictably load external modules, but I can't understand how it should work properly.

@mightyaleksey
Copy link
Member Author

Okay, I figured it out, how the trace should work 💃

@mightyaleksey
Copy link
Member Author

Anyways, I made that pr in order to unify the implementation between require-hook and css-modulesify and fix few issues: #22, #23, #27, #16

The major change is that it uses the public parser plugin now and I added a flexibility to specify custom loader by providing function through the fetch parameter. So it supports now both loader types: async and sync.
I also updated FileSystemLoader which is used by css-modulesify, so it supports now the new core module and fixes few issues.

@joeybaker
Copy link

Just checking in… what's the status on this?

@mightyaleksey
Copy link
Member Author

@joeybaker I want to rework it, but had no free time for that. I'll to make another attempt on the next weekend.

@joshwnj
Copy link
Member

joshwnj commented Feb 3, 2016

good stuff @sullenor - anything we can do to help?

@dfreeman
Copy link

dfreeman commented Mar 6, 2016

@sullenor this looks like it enables some nice stuff for downstream consumers of the loader – any status on when it might land? Anything outsiders can do to help out?

@mightyaleksey
Copy link
Member Author

@joeybaker @joshwnj @dfreeman Hi,

Sorry for the late response. I talked a lot to @ai recently and decided to create a simpler version. I decided to build another two postcss plugins to resolve ICSS :imports and to extract ICSS :exports. So, to use CSS Modules with PostCSS you will need to use the composition of the five plugins.

In my opinion it will provide simpler API for the consumers and it will be easier to share the implementation between different tools (gulp, webpack).

Currently, I almost finished those plugins, so sooner or later I'll be able to send another pr.

@huan086
Copy link

huan086 commented May 16, 2016

@sullenor

I checked out your version of css-modulesify proof-of-concept, css-modules-loader-core the-new-api and postcss-modules-scope absolute-path.

The paths are resolved correctly, but I'm getting the following

Browserify Error { Error: Cannot find module 'folder2\common.css' while parsing file: D:\folder1\folder2\common.css

before any of the plugins I've specified using use gets called. Any idea what is wrong?

@dfreeman
Copy link

@sullenor Just checking in again since it's been a few months — how's the implementation on the other plugins looking? Is the idea that this module just becomes a lightweight layer of glue between the various constituent plugins?

@dfreeman
Copy link

dfreeman commented Oct 4, 2016

Time for the quarterly check-in: any movement here, or should we consider this repo more or less abandoned? I'm evaluating just reimplementing Parser in my downstream project and consuming the rest of the PostCSS plugins directly.

btd added a commit to btd/css-modules-loader-core that referenced this pull request Oct 18, 2016
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.

5 participants