npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

14

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

  1. Features
  2. Installation
  3. Usage
  4. Interface
  5. Contributing
  6. License
  7. 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:

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:

    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:

    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

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:

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