cidgoh / DataHarmonizer

A standardized browser-based spreadsheet editor and validator that can be run offline and locally, and which includes templates for SARS-CoV-2 and Monkeypox sampling data. This project, created by the Centre for Infectious Disease Genomics and One Health (CIDGOH), at Simon Fraser University, is now an open-source collaboration with contributions from the National Microbiome Data Collaborative (NMDC), the LinkML development team, and others.
MIT License
91 stars 23 forks source link

Add Babel transpile step to lib build #345

Closed pkalita-lbl closed 1 year ago

pkalita-lbl commented 1 year ago

The need for this came up in the process of integrating the published library components into the NMDC project. Downstream clients like that will not generally want to have to transpile ES6 features being used here (e.g. class field declarations) themselves.

ddooley commented 1 year ago

Transpile means convert javascript into other target languages? So are you saying this code hides some ES6 import/export plumbing? I'm not quite following but I trust your modifications.

pkalita-lbl commented 1 year ago

Ah sorry. Transpile in this context means converting JavaScript that uses newer language features into JavaScript that only uses older language features. Often toolchains (webpack, rollup, etc) will assume that code brought in as a dependency (i.e in node_modules) adheres to some baseline JavaScript language level and parse it strictly according to that spec. So if it encounters some newish feature (like, say, the &&= operator, introduced around 2021) it will not be able to parse it.