# ecowebmetrics

> 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.

Latest version **1.2.2** (published 2023-10-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install ecowebmetrics
pnpm add ecowebmetrics
yarn add ecowebmetrics
bun add ecowebmetrics
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2023-10-19 |
| First published | 2023-10-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.2 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | EcoWebMetrics Team |
| Maintainers | meanzar |
| Keywords | green, web, metrics, carbon, carbon footprint |

## Links

- npm: https://www.npmjs.com/package/ecowebmetrics
- Repository: https://github.com/Meanzar/EcoWebMetrics
- Homepage: https://github.com/Meanzar/EcoWebMetrics#readme
- Issues: https://github.com/Meanzar/EcoWebMetrics/issues
- npm.io page: https://npm.io/package/ecowebmetrics

## Dependencies (3)

- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [image-size](https://npm.io/package/image-size.md) ^1.0.2
- [ecowebmetrics](https://npm.io/package/ecowebmetrics.md) ^1.2.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2023-10-19
- 1.2.1 — 2023-10-19
- 1.2.0 — 2023-10-19
- 1.0.1 — 2023-10-19
- 1.1.1 — 2023-10-19

## README

# EcoWebMetrics

<img src="[https://github.com/favicon.ico](https://github.com/Meanzar/EcoWebMetrics/assets/90480267/781dc3a3-1014-4132-8857-130c299cf2ee)" width="10px">

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

1. [Features](#features)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Interface](#interface)
5. [Contributing](#contributing)
6. [License](#license)
7. [Roadmap](#roadmap)

## 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:

```bash
npm install ecowebmetrics
```

## Usage

To get started with EcoWebMetrics, follow these steps:

1. **Initialize the library in your project**:

   In your JavaScript project, import EcoWebMetrics and initialize it:

   ```javascript
   import EcoWebMetrics from "ecowebmetrics";

   // Initialize EcoWebMetrics
   const metrics = new EcoWebMetrics();
   ```

2. **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

3. **Generate a sustainability score**:

   Run EcoWebMetrics to generate a sustainability score for your code:

   ```bash
   npm run ecowebmetrics
   ```

4. **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
![interface](https://github.com/Meanzar/EcoWebMetrics/assets/90480267/6933b0eb-d8d7-4e2e-978a-6c42d2cdc938)

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:

1. Fork the repository on GitHub.

2. Clone your forked repository to your local machine.

3. Create a new branch for your feature or bug fix:

   ```bash
   git checkout -b feature/your-feature-name
   ```

4. Make your changes and commit them.

5. Push your changes to your fork on GitHub.

6. Create a pull request on the main repository.

7. We'll review your pull request and merge it if it aligns with our guidelines and goals.

Please read our [Contributing Guidelines](CONTRIBUTING.md) for more details.

## License

EcoWebMetrics is released under the [MIT License](LICENSE).

This library has been made for a school project at the IIM DIGITAL SCHOOL.

For any question, contact ecowebmetrics@gmail.com

---
_Source: https://npm.io/package/ecowebmetrics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
