Open jmike opened 6 years ago
Hi @jmike Thank you for suggestion.
Please go ahead and create a PR for that if you want to.
One important thing that should probably be mentioned here is that this repo is not meant to be used on production. It is for learning and researching purposes only. The only reason for having this repo on npm is probably to make it possible to re-use its functions by other non-production research projects.
I agree with @trekhleb i'm not sure its a good idea to signal this project is for production use, it might set a precedent of users then wanting to optimise certain functions, which then defeats the learning aspect of it. Maybe its worth saying in the README these shouldn't be used in production instead?
ahh i should have RTFM!
No problem :D
Perhaps a forked repository with production-ready code that does have such optimizations would be useful.
J
@jmike Have you made any progress in this issues? Recently, I worked on a college project and the lack of a proper package in npm made my work very difficult.
Edit: Resolved via https://babeljs.io/en/setup#installation.
What would be the easiest way to reference this project from another project? Cloning the repo and running npm install
didn't help much:
require(
"../node_modules/javascript-algorithms-and-data-structures/src/algorithms/graph/bellman-ford/bellmanFord.js")
export default function bellmanFord(graph, startVertex) {
^^^^^^
SyntaxError: Unexpected token 'export'
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:
I'd be more that willing to provide a PR using rollup + babel.