Comments (5)
Wait, what? So you're telling me that resolve-from
actually checks a file for its existence? I thought it would just perform some string manipulation with pathnames. That would work, right? I think we can just remove resolve-from
entirely and replace it with https://nodejs.org/api/path.html#path_path_resolve_paths
If you want to try that out and send a PR I will gladly accept it. Otherwise your solution will work too, but I really prefer to NOT check for file existence, that's useless filesystem bloat.
If you don't want to send a PR, show me at least a repo of yours with a missing file like that so I can use it for testing (as you can see, there are no unit tests in this project -- yes, I'm a horrible programmer).
from node-dependencies-view.
Thanks.
I just tried to replace resolve-from
by path.resolve
, however it does not produce the expected result.
Required modules do not get their file extensions appended, and are considered as different entities from the actual files (resulting in the same module being shown twice in two different places in the graph)
Do you see a solution for this? Perhaps that another approach is to be considered...
from node-dependencies-view.
I don't know why you replaced the ,
with a +
from node-dependencies-view.
Forget about it. You were right. It is not. I've broken everything.
(That's why you should always have unit tests.)
from node-dependencies-view.
Thanks
from node-dependencies-view.
Related Issues (2)
- Branch support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-dependencies-view.