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

Pass only one object which contains search string + replacement #57

Open
timkraut opened this issue Aug 8, 2015 · 2 comments
Open

Pass only one object which contains search string + replacement #57

timkraut opened this issue Aug 8, 2015 · 2 comments

Comments

@timkraut
Copy link

timkraut commented Aug 8, 2015

Hi,

maybe you could include an option to pass only 1 object to replace(). This would allow me to keep my configuration separate from the task. At the moment, I have to pass 2 arguments which contradicts somehow the idea to have a single configuration object for each plugin.

This would be awesome! Thanks in advance!

@oleggromov
Copy link
Contributor

This idea sounds good for me! There are also a bunch of gulp-plugins that take one argument filled by the whole configuration object (for example, gulp-babel, gulp-postcss, autoprefixer), so it seems to be a neat improvement. Сhanging configuration format also correlates with #50 and probably will fulfil the major release idea.

@lazd How do you think?

@lazd
Copy link
Owner

lazd commented Aug 24, 2016

I would be -1 for replacing the two argument approach completely, but it might be acceptable to pass a single object as an alternative. Perhaps just { search: 'x', replace: 'y' }.

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

No branches or pull requests

3 participants