reymond-group / smilesDrawer

A small, highly performant JavaScript component for parsing and drawing SMILES strings. Released under the MIT license.
https://smilesdrawer.rocks
MIT License
416 stars 66 forks source link

Would you consider accepting a pull request that modernizes the toolchain? #151

Open KrofDrakula opened 1 year ago

KrofDrakula commented 1 year ago

I'm experimenting with a fork of this repository and considering migrating the toolchain to the following configuration:

  1. Converting all files to fully typed TypeScript and emit TypeScript type definitions
  2. Leverage TS types to generate API documentation using TypeDoc instead of manually maintained JSDoc
  3. Use parcel instead of gulp+browserify to build separate builds for CommonJS, ES modules and global targets for use in NPM modules
  4. Possibly enable GitHub Actions to build and deploy documentation without manual steps

This would solve a number of problems:

  1. Enables strict typing when importing the library in other projects — currently no types are provided, and there is a lot of trial-and-error for users of the library. It also enables use of private, public and protected keywords for better access hints.
  2. Leveraging TS types instead of JSDoc would mean that documentation would always be in sync with code.
  3. Currently, only CommonJS modules are exported, which means that projects consuming the library with ES modules are left out in the rain. Multiple build targets means that specific versions of the builds would enable all consumers and bundlers to correctly include the right build file to use.
  4. README and other documentation seems to be quite out of sync with the repository's latest version (some examples use 1.x, some 2.x). This could be improved by moving the documentation into the TypeDoc build flow to prevent deviation and deduplicate code.

Would this be something the team would consider merging upstream?