Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.43 KB

CONTRIBUTING.md

File metadata and controls

58 lines (40 loc) · 1.43 KB

Contributing to esm.sh

Welcome, and thank you for taking time in contributing to esm.sh project!

Development setup

You will need Golang 1.18+.

  1. Fork this repository to your own GitHub account.
  2. Clone the repository to your local device.
  3. Create a new branch git checkout -b BRANCH_NAME.
  4. Change code then run the testings.
  5. Push your branch to Github after all tests passed.
  6. Make a pull request.
  7. Merge to master branch by our maintainers.

Configration

To configure the server, create a config.json file in the project root directory. Here is an example:

// config.json
{
  "port": 8080,
  "workDir": ".esmd",
  "npmRegistry": "https://registry.npmjs.org",
  "npmToken": "xxxxxx"
}

You can find all the server options in config.exmaple.jsonc.

Run the sever in development mode

go run main.go --dev

Then you can import React from "http://localhost:8080/react"

Run testings

# Run all tests
./test/bootstrap.sh

# Run tests for a specific case (directory name)
./test/bootstrap.sh preact

# Run tests with `clean` option (purge previous builds)
./test/bootstrap.sh --clean

All the tests are written in Deno, you can find them in test/ directory.

Code of Conduct

All contributors are expected to follow our Code of Conduct.