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+.
- Fork this repository to your own GitHub account.
- Clone the repository to your local device.
- Create a new branch
git checkout -b BRANCH_NAME
. - Change code then run the testings.
- Push your branch to Github after all tests passed.
- Make a pull request.
- 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://npmjs.org/registry",
"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
# Or run tests after cleaning the cache
./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.