![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
git-repo-lines-of-code
Advanced tools
Get your Github repository's lines of code with an option of excluding any files from the stat
This project provides a function to calculate the total number of lines of code in a GitHub repository, with the option to exclude specific file paths (The files bloating the number of lines of code and need to be part of the repo, e.g package-lock.json
, data.json
etc.).
npm install git-repo-lines-of-code
getRepoLinesOfCode
Fetches the total number of lines of code in a given repository.
owner
(string): The owner of the GitHub repository.repo
(string): The name of the GitHub repository.excludeFilePaths
(string[]): An optional array of file paths to exclude from the line count.Promise<number|string>
: The total number of lines of code, minus any lines of code in the given file paths to exclude, or a string describing an error if the data could not be fetched.import getRepoLinesOfCode from 'git-repo-lines-of-code';
const owner = 'octocat';
const repo = 'Hello-World';
const excludeFilePaths = ['path-to-file.ts', 'path-to-auto-generated-code.json'];
getRepoLinesOfCode(owner, repo, excludeFilePaths)
.then((linesOfCode) => {
console.log(`Total lines of code: ${linesOfCode}`);
})
.catch((error) => {
console.error(`Error: ${error}`);
});
Clone the repository and install dependencies:
git clone https://github.com/d-beloved/git-repo-lines-of-code.git
cd git-repo-lines-of-code
npm install
Run the project:
npm start
To run the tests, use the following command:
npm test
Contributions are welcome! Please see the CONTRIBUTING file for guidelines on how to contribute to this project.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
Get your Github repository's lines of code with an option of excluding any files from the stat
The npm package git-repo-lines-of-code receives a total of 2 weekly downloads. As such, git-repo-lines-of-code popularity was classified as not popular.
We found that git-repo-lines-of-code demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.