ecowebmetrics
v1.2.2
Published
This NPM package will help you adjust your website to be more eco-friendly by calculating the carbon footprint its website and give you tips on how to improve it.
Downloads
31
Maintainers
Readme
EcoWebMetrics
EcoWebMetrics is a JavaScript library that provides developers with feedback on their code, helping them write more sustainable and environmentally friendly code. It leverages data collected from unit tests to generate a score and provide insights into the ecological impact of the code.
Table of Contents
Features
- Calculate a sustainability score for your code.
- Provide feedback on how to improve the environmental impact of your code.
- Integration with popular unit testing frameworks.
Installation
You can install EcoWebMetrics via npm:
npm install ecowebmetrics
Usage
To get started with EcoWebMetrics, follow these steps:
Initialize the library in your project:
In your JavaScript project, import EcoWebMetrics and initialize it:
import EcoWebMetrics from "ecowebmetrics"; // Initialize EcoWebMetrics const metrics = new EcoWebMetrics();
Run EWM:
The EcoWebMetrics library can be executed independently, but it is designed to work in conjunction with your unit tests for more accurate results. While it can run as a standalone tool, its precision and effectiveness are maximized when used alongside your unit tests
Generate a sustainability score:
Run EcoWebMetrics to generate a sustainability score for your code:
npm run ecowebmetrics
Review the feedback:
After running the command, you'll receive feedback and suggestions for improving the environmental impact of your code.
Interface
This local interface will help you see the things to imrpove in your code
In your console, you will get the result of the carbon emission for you site
Roadmap
This is the link to the roadmap with our goals
https://www.notion.so/8cff685b3acf4161a28d9ef852237f16?v=e9e1c14837fc44c98bc5054bfd459e70&pvs=4
Contributing
We welcome contributions from the community. If you'd like to contribute to EcoWebMetrics, please follow these steps:
Fork the repository on GitHub.
Clone your forked repository to your local machine.
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
Make your changes and commit them.
Push your changes to your fork on GitHub.
Create a pull request on the main repository.
We'll review your pull request and merge it if it aligns with our guidelines and goals.
Please read our Contributing Guidelines for more details.
License
EcoWebMetrics is released under the MIT License.
This library has been made for a school project at the IIM DIGITAL SCHOOL.
For any question, contact [email protected]