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

Add custom load support #144

Merged
merged 2 commits into from
Jan 9, 2016
Merged

Add custom load support #144

merged 2 commits into from
Jan 9, 2016

Conversation

TrySound
Copy link
Member

@TrySound TrySound commented Jan 9, 2016

No description provided.

@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

@MoOx Maybe we should in the same way remove glob support? I created api which let in fast way add this feature.

postcssImport({
  resolve: function (id, base, opts) {
    return glob.sync(path.join(base, id));
  }
})

@MoOx
Copy link
Contributor

MoOx commented Jan 9, 2016

I am sure a lot of people use glob and don't want to type this function. Let's keep it in the core.
Why did you removed encoding option?

@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

@MoOx Cause I replaced it with custom load. I think it more consistent way.

@MoOx
Copy link
Contributor

MoOx commented Jan 9, 2016

So please can you add in the CHANGELOG a way to migrate? Thanks :)

@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

Like this?

@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

I just would like to keep core as small as it possible. And glob support is weird in browser way. We made good and simple api for that. glob can be realized in the same way as encoding support. Also globs can be realized in different ways. What we did can be not what users expect.

@MoOx
Copy link
Contributor

MoOx commented Jan 9, 2016

So if we remove things like that, I really think we should provide snippets "ready to use" to provide an easy upgrade.
Can you handle those? They should be in the CHANGELOG.

MoOx added a commit that referenced this pull request Jan 9, 2016
@MoOx MoOx merged commit 3ddc78c into dev Jan 9, 2016
@MoOx MoOx deleted the custom-load branch January 9, 2016 18:18
@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

@MoOx The same like encoding example?

@MoOx
Copy link
Contributor

MoOx commented Jan 9, 2016

Yeah that's cool. (btw, why did you used fs sync in it?)

@TrySound
Copy link
Member Author

TrySound commented Jan 9, 2016

@MoOx It's simpler than wrapping async in promise :)

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