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

gulp-postcss has "postcss" stripped automatically #10

Open
scotthovestadt opened this issue Oct 9, 2015 · 12 comments
Open

gulp-postcss has "postcss" stripped automatically #10

scotthovestadt opened this issue Oct 9, 2015 · 12 comments

Comments

@scotthovestadt
Copy link

Please support gulp-postcss.

@scotthovestadt
Copy link
Author

For anyone that finds this looking for a solution:

require('load-plugins')('gulp-*', { strip: ['gulp'] });

This strips only the gulp prefix.

My recommendation is to make the default behavior to strip the prefix that was passed in and allow the user to strip extra things when he feels like it.

@TrySound
Copy link
Collaborator

TrySound commented Oct 9, 2015

@jonschlinkert Maybe we need to strip only first part?

@jonschlinkert
Copy link
Owner

Have you tried passing a custom strip function on the options? We probably need more unit tests for this

@TrySound
Copy link
Collaborator

TrySound commented Oct 9, 2015

@jonschlinkert Seems like it deeply extended. I will replace it with object-assign.

@TrySound
Copy link
Collaborator

TrySound commented Oct 9, 2015

@jonschlinkert However extend-shallow is not deep..

@jonschlinkert
Copy link
Owner

Seems like it deeply extended. I will replace it with object-assign.

Are you saying that strip is being overwritten? seems like options should only be one level deep in this case, so there is no reason to deep merge. if there is, object-assign is identical in result to extend-shallow. I'd rather use mixin-deep.

@jonschlinkert
Copy link
Owner

even better, we should fix whatever is preventing the options from extending properly.

edit: I think i understood what you were saying in reverse. so I think we're in agreement, but there is still no reason to use object-assign. extend-shallow does the same thing but faster.

@TrySound
Copy link
Collaborator

TrySound commented Oct 9, 2015

@jonschlinkert I just forgot that extend-shallow is not deep extend.

@scotthovestadt
Copy link
Author

Any word on this issue?

@TrySound
Copy link
Collaborator

@scotthovestadt

plugins('gulp-*', {
  strip: 'gulp'
});

works fine

@TrySound
Copy link
Collaborator

@jonschlinkert Maybe we shouldn't use registry and should leave strip to user?

@jonschlinkert
Copy link
Owner

yeah I'm refactoring atm. I think that's a good idea

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

No branches or pull requests

3 participants