Welcome, and thank you for taking time in contributing to esm.sh project!
You will need Golang(1.22+) and Deno(1.40+) installed on a Linux or macOS machine.
- 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 tests
- Push your branch to GitHub after all tests passed.
- Make a pull request.
- Merge to master branch by our maintainers.
Create a config.json
file in the project root directory following the example below:
// config.json
{
"port": 8080,
"workDir": ".esmd",
"npmRegistry": "https://registry.npmjs.org/", // change to your own registry if needed
"npmToken": "xxxxxx", // remove this line if you don't have one
}
More server options please check config.exmaple.jsonc.
go run main.go --debug
Then you can import React
from "http://localhost:8080/react"
We use Deno to run all the integration testing cases. Make sure you have Deno installed on your computer.
# Run all tests
./test/bootstrap.ts
# Run a test for a specific case (directory name)
./test/bootstrap.ts react-18
# Run tests with `clean` option (purge previous builds)
./test/bootstrap.ts --clean
To add a new integration test case, copy the test/_template directory and rename it to your case name.
cp -r test/_template test/case_name
nvim test/case_name/test.ts
./test/bootstrap.ts case_name