thegreenwebfoundation / thegreenwebfoundation/developer-docs

Document how to access methods within specific model classes

Open
#64 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

gwf-green-code-challenge
Dominant language
JavaScript
Stars
7
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

CO2.js v0.16 introduced the ability to access methods that were previously private within a given model class. This was applied in PR https://github.com/thegreenwebfoundation/co2.js/pull/220.

These methods could be used by developers to do more than just estimate carbon emissions - allowing them to expose information about estimated energy use, operational v. embodied emissions, and more.

However, there's no documentation for these methods.

Describe the solution you'd like

These private methods should be documented on the Methods page in the CO2.js section of the docs website.

The methods to be document are:

Sustainable Web Design v4

Sustainable Web Design v3

Describe alternatives you've considered
We've tried to expose these via alternate tooling like JSR, however that's no possible without a rewrite of the library to TypeScript which is something we're not in a position to steward at this time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Methods page in the CO2.js section and compare it with the referenced implementations in src/sustainable-web-design-v3.js and src/sustainable-web-design-v4.js. Document all listed methods, including their available inputs and outputs, so developers can use them to access energy, emissions, and rating information.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.