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

Fix onImport "from" option #54

Closed
wants to merge 1 commit into from
Closed

Conversation

jednano
Copy link
Contributor

@jednano jednano commented Jun 17, 2015

Fixes #44

@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

This is supposed to fix it already 5e2169d

@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

Hum maybe I should made the same in the plugin itself.

@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

Any tests to push to confirm the fix ?

@jednano
Copy link
Contributor Author

jednano commented Jun 17, 2015

@MoOx I can verify that 5e2169d does not fix the issue. I currently have version 6.0.0 installed and I'm still getting the following output:

13:53 $gulp styles
[13:54:12] Using gulpfile z:\gulpfile.js
[13:54:12] Starting 'styles'...
[13:54:12] Finished 'styles' after 37 ms
========== import ===========
[13:54:12] import: z:\styles\sheets\global\global.css
[13:54:12] import: z:\styles\blocks\block-foo.css
========== import ===========
[13:54:12] import: z:\styles\sheets\global\global.css
[13:54:12] import: z:\styles\blocks\block-foo.css
[13:54:12] import: z:\styles\blocks\block-bar.css
========== import ===========
[13:54:12] import: z:\styles\sheets\global\global.css
[13:54:12] import: z:\styles\blocks\block-bar.css
[13:54:12] import: z:\styles\blocks\block-foo.css

The fix in this PR gives me the desired/expected output:

13:53 $gulp styles
[13:54:12] Using gulpfile z:\gulpfile.js
[13:54:12] Starting 'styles'...
[13:54:12] Finished 'styles' after 37 ms
========== import ===========
[13:54:12] import: z:\styles\sheets\global\global.css
[13:54:12] import: z:\styles\blocks\block-foo.css
========== import ===========
[13:54:12] import: z:\styles\sheets\page1\page1.css
[13:54:12] import: z:\styles\blocks\block-foo.css
[13:54:12] import: z:\styles\blocks\block-bar.css
========== import ===========
[13:54:12] import: z:\styles\sheets\page2\page2.css
[13:54:12] import: z:\styles\blocks\block-bar.css
[13:54:12] import: z:\styles\blocks\block-foo.css

I'll have to investigate further how to write a test for this.

@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

You current PR will break from option for people that specify it by hand, let my try something else.

@jednano
Copy link
Contributor Author

jednano commented Jun 17, 2015

OK!

MoOx added a commit that referenced this pull request Jun 17, 2015
@MoOx
Copy link
Contributor

MoOx commented Jun 17, 2015

Can you try npm install postcss/postcss-import#fix.options-mutability ?

@jednano
Copy link
Contributor Author

jednano commented Jun 17, 2015

That works! Thanks!

@jednano
Copy link
Contributor Author

jednano commented Jun 17, 2015

I guess you can close this PR along with #44 when you merge fix.options-mutability.

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