Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 : enhance webrequire to support node_modules #587

Merged
merged 9 commits into from
Jun 22, 2020
Merged

Conversation

z3dev
Copy link
Member

@z3dev z3dev commented May 22, 2020

WORK IN PROGRESS. DO NOT MERGE

These changes enhance webRequire() to support:

  • module lookup by relative paths (same as before)
  • module lookup from directories (index, index.js, 'main' from package.json)
  • module lookup by module name (from node_modules hiearchy)

The algorithm follows the NODE module lookup pseudocode.

This is a BIG ONE!!!

I was able to extend the webrequire logic to follow NODE exactly. I've thrown everything possible as this, and everything works! Really!

@kaosat-dev BIG KUDOS!!! Your implement was brilliant! It just needed a few tweaks to support node_modules.

Completes #245

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?

@z3dev
Copy link
Member Author

z3dev commented May 22, 2020

jscad_test_projects.zip

@z3dev z3dev requested a review from kaosat-dev May 22, 2020 01:32
@z3dev
Copy link
Member Author

z3dev commented Jun 19, 2020

@kaosat-dev if you have time to review them let me know, otherwise this will be merged soon.

Copy link
Member Author

@z3dev z3dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last review. No further changes required.

@z3dev z3dev merged commit 59ef847 into V2 Jun 22, 2020
@kaosat-dev kaosat-dev mentioned this pull request Jun 23, 2020
58 tasks
@z3dev z3dev deleted the v2-enhance-webrequire branch July 7, 2020 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant