Skip to content

A set of CO2 footprint tools to measure the impact of the code we ship

License

Notifications You must be signed in to change notification settings

adicarlisle/carbon-tools

 
 

Repository files navigation

Carbon Tools

lerna

This is a mono-repository/multi-package built with Lerna & TypeScript.

Contents

  1. bytes-to-co2: A library that estimates the CO2 released to the atmosphere based on the transferred byte size.
  2. co2-extension: A Chrome (for now) that shows the amount of CO2 released by visiting the current page.
  3. lighthouse-plugin-co2: A Lighthouse Plugin that calculates the CO2 of all the data transferred by a page.
  4. co2-data: A small library with information of carbon intensities by country.

Using as a dependency

For now, we are only exposing as libraries co2-data and bytes-to-co2, which you can install in your project using:

  • yarn add bytes-to-co2 or npm i bytes-to-co2
  • yarn add co2-data or npm i co2-data

Development - Getting started

Project supports NodeJS >= v12.x

  1. Clone the project git clone https://github.com/dvelasquez/carbon-tools.git
  2. Run yarn to install the dev dependencies
  3. Use yarn lerna:build to build all the libraries
  4. Use yarn lerna:bootstrap to create symlinks between the libraries
  5. Use yarn lint to lint files and catch issues with the code styling, or possible code errors
  6. Use yarn test to run Node TAP tests

About

A set of CO2 footprint tools to measure the impact of the code we ship

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.0%
  • JavaScript 12.0%
  • HTML 1.0%