trekhleb / trekhleb/javascript-algorithms

Suggestion: ship production ready build to npm

Open
#196 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
197k
Forks
31k
PR merge metrics
No merged PRs in 30d

Description

Hey,

I noticed that the current version deployed on npm (i.e. https://www.npmjs.com/package/javascript-algorithms-and-data-structures) is more or less a mirror of the source code here. javascript-algorithms is really awesome and someone might want to use it as an external library on production (e.g. a web app or node app). Unfortunately, the use of ES modules, complicates things a bit.

May I suggest:

  1. Transpiling code to ES2015, using CommonJS instead of ES modules;
  2. Removing redundant source code (e.g. comments, README, etc) to reduce package size.

I'd be more that willing to provide a PR using rollup + babel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reviewing the current npm package and how the repository builds its ES module source; compare the proposed Rollup and Babel approach with the existing package contents. Done means a production-ready CommonJS/ES2015 package is published without redundant source or documentation files.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, rollup
Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.