Move export-related JS to export.js