This repository contains type definitions for the EarthaPro API. These types are used to ensure consistent data structures across the API.
Before you can contribute to the EarthaPro API, you need to:
- Create an NPM account: Visit npmjs.com and click on "Sign Up" to create a new account.
- Join the NPM EarthaPro Group: Contact Parth or Peter to add you as a contributor to the EarthaPro Group on NPM.
- Login to your NPM account on your local machine: Run
npm adduser
in your terminal and follow the prompts to login into your NPM account.
Follow these steps to implement a new feature:
- Checkout the
main
branch and create a feature branch using thegit checkout -b "feature/feature-name"
convention. - Implement and test the feature.
- Commit your changes to the branch with a descriptive commit message.
- Run
npm run build:prod
to prepare the feature for publishing to the npm registry. Alternatively, runnpm run build:local
to test the build locally. - Push the branch and create a pull request (PR) to merge your changes into the
main
branch.
To set up your local environment for development, follow these steps:
-
Install dependencies:
npm install
-
Run the local build command:
npm run build:local
This command builds the project locally.
-
Prebuild and postbuild hooks:
These are scripts that run before and after the build process respectively. They can be defined in the
package.json
file under thescripts
section. For example:"scripts": { "prebuild:local": "rm -rf dist", "build:local": "tsc", "postbuild:local": "cp package.json ./dist/package.json" }
To prepare your project for production, follow these steps:
-
Install dependencies:
npm install
-
Run the production build command:
npm run build:prod
This command builds the project and prepares it for publishing to npmjs.org.
-
Prebuild and postbuild hooks:
These are scripts that run before and after the build process respectively. They can be defined in the
package.json
file under thescripts
section. For example:"scripts": { "prebuild:prod": "rm -rf dist", "build:prod": "tsc && npm version patch -m \"Bump to %s\"", "postbuild:prod": "cp package.json ./dist/package.json && npm publish --access public ./dist" }
The code for this project is hosted on GitHub and the package is published on NPM. You can access them at the following URLs: