diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7301543c248..fa39711af56 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,20 @@ You can use `rustup component add --toolchain nightly rustfmt-preview` to instal `rustfmt +nightly --unstable-features --skip-children` on the changed files to automatically format your code. * Push your commits to GitHub and create a pull request against swc's `master` branch. +## Getting your development environment set up + +After cloning the project there are a few steps required to get the project running. + +1. `git submodule update --init --recursive` This will pull in the ecmascript test suited +2. Go to the folder `ecmascript/transforms` and run `yarn install` +3. You need to setup some environment variables in order for the tests to run + +``` +RUST_MIN_STACK=16777216 +RUSTFLAGS="--cfg procmacro2_semver_exempt" +``` + +4. You can now run the tests with `RUST_BACKTRACE=full cargo test --color always --all --all-features` ## Pull requests