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

Feature Request: Support for multiple files? #2

Open
johno opened this issue Sep 13, 2017 · 2 comments
Open

Feature Request: Support for multiple files? #2

johno opened this issue Sep 13, 2017 · 2 comments

Comments

@johno
Copy link
Collaborator

johno commented Sep 13, 2017

Firstly, thanks for creating this module.

I was curious if you were interested adding support for multiple files with custom contents? Perhaps as a different option that accepts an array with the same default structure (each having their own commit)?

const firstCommit = require('gfc');

firstCommit.sync(dir, {
  files: [{
    commit: 'Add readme',
    filename: 'README.md',
    contents: '# Awesome'
  }, {
    commit: 'Add config',
    filename: 'config.json',
    contents: '{ "hello": "world" }'
  }]
});

Or perhaps you have a better idea for a potential API?

Happy to create a PR if you're interested in adding this to your module. Thanks!

@johno
Copy link
Collaborator Author

johno commented Sep 13, 2017

On second thought, the file objects wouldn't contain the commit key because they'd all share the single commit to keep things simplest.

@jonschlinkert
Copy link
Owner

sure, a PR would be great! thanks!

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

2 participants