Skip to content

wesleyara/down-git-files

Repository files navigation

down-git-files

down-git-files provides methods for download files in public github repositories

Open Source Love MIT Licence npm version npm downloads All Contributors


🚀 How use

Instalation:

npm install down-git-files
#or
yarn add down-git-files

Answer the questions (When choosing the tool, use the arrows keys to navigate, the spacebar to select and enter to finish)

🛠️ Tools

Example:

fileRequest

Get file content from github.

import { fileRequest } from "down-git-files";

const main = async () => {
  const response = await fileRequest({
    user: "wesleyara",
    repo: "down-git-files",
    path: "commitlint.config.js",
    branch: "main",
  });

  console.log(response);
};

main();

and create a file with the content

import { fileRequest } from "down-git-files";

const main = async () => {
  const response = await fileRequest({
    user: "wesleyara",
    repo: "down-git-files",
    path: "commitlint.config.js",
    branch: "main",
    file: "commitlint.config.js",
  });

  console.log(response);
};

main();

for more information, see the docs, Vanilla and React

📝 Contributing

Your contribution to the down-git-files is essential for the evolution of the project, you can do it as follows:

  • Open an issue to clear doubts, report bugs or give ideas
  • Open a pull request to give ideas for code improvement, implementation of new features and bug fixes

These are just some of the ways you can contribute to the project read the CONTRIBUTING for more information

🧑 Authors


Wesley Araújo

✨ Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

📄 License

down-git-files is a open source project licensed as MIT.