nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
87 stars 49 forks source link

Use inline exports #761

Closed victorlin closed 7 months ago

victorlin commented 7 months ago

Description of proposed changes

This a follow-up to "Use cjs-to-es6 to help conversion" (1963fcd7), which left exports at the bottom of the file. That was necessary for CJS, but now ESM syntax can be leveraged for more concise code.

I searched for instances of "export {" and manually applied the conversion where possible. I skipped src/async.js since that's a vendored copy of an external script.

Related issue(s)

Proposed in https://github.com/nextstrain/nextstrain.org/pull/735#discussion_r1401216668.

Checklist