A javascript library to get individual file contributors from Github.
npm install github-contributors-file
getContributors(owner, repositoryName, filePath, token).then(callbackFunction)
import getContributors from 'github-contributors-file';
getContributors('sandoche', 'Jekyll-webpack-boilerplate', '_i18n/en.yml').then((contributors) => {
console.log(contributors);
/*
This will return
[
{
avatar_url: "https://avatars2.githubusercontent.com/u/3635348?v=4"
login: "sandoche"
url: "https://github.com/sandoche"
}
]
*/
});
getContributors('naming-convention', 'naming-convention-design', 'README.md').then((contributors) => {
console.log(contributors);
/*
This will return
[
{
avatar_url: "https://avatars3.githubusercontent.com/u/6988069?v=4"
login: "patriciamayo"
url: "https://github.com/patriciamayo"
},
{
avatar_url: "https://avatars2.githubusercontent.com/u/3635348?v=4"
login: "sandoche"
url: "https://github.com/sandoche"
}
]
*/
})
yarn build
or npm run build
- produces production version of your library under the lib
folderyarn dev
or npm run dev
- produces development version of your library and runs a watcheryarn test
or npm run test
- it runs the tests :)yarn test:watch
or npm run test:watch
- same as above but in a watch modePlease ⭐️ this repository if this project helped you!
If you like this project, feel free to donate: