![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@scottlogic/tech-carbon-estimator
Advanced tools
The tech carbon estimator is a web component that allow you to estimate, at high level, your carbon emissions
The tech carbon estimator is a web component that allow you to estimate, at high level, your carbon emissions
exposed as a web component tech-carbon-estimator
. The component takes the follow optional input:
extra-height
- this is extra height to be added whe calculating the height if the chart. eg a header/footer that will be visible on the pageYou will need to import the following files to use the tech-carbon-estimator:
These files can be found under dist/tech-carbon-estimator when developing locally.
To run the following ng
commands, you will need to have the Angular CLI installed globally. This requires that you have Node.js installed and then run the following command from any directory:
npm install -g @angular/cli
You will also need to run npm install
from the root directory of this repository.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files. You can also run ng serve --open
to automatically open the application in a browser tab.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Web Test Runner.
The project uses GitHub Actions to automate certain workflows. One such workflow runs when opening a pull request and pushing changes to the related branch. If you would like to skip running the workflow for a given push to a PR branch there are various ways this can be achieved. For example, adding [skip ci]
to the end of the commit message in the push (e.g. git commit -m "My message [skip ci]"
) will skip running the workflow for that push.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
This project is configured to use Linux/macOS line endings (Line Feed or LF), which will be enforced by prettier. If working on Windows, your editor should be configured to insert these kind of line endings (the default for VSCode using the repo settings). To prevent git from attempting to change line endings when pulling down changes you should set the following config option:
git config core.autocrlf input
This option can also be set when cloning the repository by running:
git clone REPOSITORY_URL --config core.autocrlf=input
Applying the setting when cloning rather than after cloning may help resolve issues related to line endings when setting up the project in VSCode.
For further documentation please see the docs folder.
© Copyright Scott Logic
FAQs
The tech carbon estimator is a web component that allow you to estimate, at high level, your carbon emissions
The npm package @scottlogic/tech-carbon-estimator receives a total of 11 weekly downloads. As such, @scottlogic/tech-carbon-estimator popularity was classified as not popular.
We found that @scottlogic/tech-carbon-estimator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.