-
Notifications
You must be signed in to change notification settings - Fork 84
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
System js support #29
Comments
Hi Marthinus, Thanks for contributing! Webpack and SystemJS support are definitely items on the wish list. I'm Before a PR, I'd like to understand the changes that are necessary to It's definitely possible to add support in dependency-tree core, but my
|
@mrjoelkemp: Yeah after looking at the code more I also came to the conclusion that it should be in filling cabinet, somewhere around here. I believe it would simply be a matter of adding a lookup function specific to 'systemjs' that would just use it's config which is just an associative array to look up the full paths. Distinguishing between 'systemjs' and 'es6' modules would be a bit more tricky, but we can maybe just check if there are any forward slashes('/') in the path. I haven't forked anything yet, just did a clone. But If you cool with it I will fork filling-cabinet try the above suggestion and once I have something that works I will point you to it. |
We might have to refactor resolve-dependency-path, to remove the SystemJS plugin handling here and place it in the |
@marthinus-engelbrecht Thanks for looking into it. I think we could introduce an artificial type |
We can also have dependency-tree support the new Happy to look at some code and help answer any questions you might have. Super excited for this! |
Yeah that's what i've also been thinking. I'll see if I can get a chance to work on this tomorrow, otherwise Saturday. |
As a side note. What made you decide to create this library instead of contributing to something like madge? I'm considering seeing if I can add support there as well. |
Great question. There's actually an open issue to integrate dependency-tree into madge. Madge is a visualization tool that needs to trace the dependency tree as a pre-req; it's not a dependency tree generation tool. I built this and many of the other libraries for https://github.com/mrjoelkemp/dependents without really knowing that Madge was tackling a subset of my needs. Ideally, I would have extracted the tree-generation stuff from Madge, but I took a bottom-up approach of building core libraries used for other parts of Dependents that were also leveraged in dependency-tree. |
Cool. Makes sense to me. I like bottom up. I was looking at |
We have a slight problem. The System.js config file isn't json, and you actually have to call |
Thanks for looking into it. Check out
|
Ok, closed the system js issue. The system-builder gives us all that we need. I've forked filling-cabinet, will be adding some code soon. |
Sounds awesome! Thanks for sticking with this!
|
@marthinus-engelbrecht Hey! Any progress on the SystemJS front? I just landed webpack support in node-dependency-tree and was thinking about tackling SystemJS. Any help is appreciated. |
@mrjoelkemp Yes there has been. Sorry, I've been a bit swamped with work. You can take a look at it here. Will see if I can get some work done this weekend. I played around a bit as well with generating json-graph and then transpiling it to a dot format and creating a graph with graphviz |
@marthinus-engelbrecht Awesome! It looks really good. I'd definitely use it within filing-cabinet (once BinaryCraft/systemjs-absolute-path-resolver#1 has been addressed). Thanks for the update! |
@mrjoelkemp: Hi, I like your dependency-tree tool. But unfortunately it doesn't meet my requirements. I use SystemsJS that uses a
system.config.js
file to map the paths of modules to specific name. See below:with
'lodash'
declared in thesystem.config.js
like so:So essentially module path resolution should take place based on the keys in your
system.config.js
I've looked at the code and I would love to try my hand at adding support for SystemJS. I've already played with your code and I have the basics working.The text was updated successfully, but these errors were encountered: