dependents / dependents Goto Github PK
View Code? Open in Web Editor NEWNavigate front-end codebases in Sublime Text 2/3
License: Other
Navigate front-end codebases in Sublime Text 2/3
License: Other
Currently only in Right-click menu
AttributeError: 'View' object has no attribute 'pathWithinRoot'
Often times someone will ask in a chat: "who uses this module?". Can use dependents but need to find a way of copying those filenames and pasting them.
Cursor could be on a separate view while you right click on a particular path and choose Dependents -> Jump to Dependency
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Dependents: Elapsed - 6.762444019317627 seconds
for ~1k modules.
Used to be 2 or 3.
Depends on: dependents/node-dependents#26
Instead of showing the dropdown, open all files
If a file has only one dependent, open that file directly, avoiding showing the quick panel and avoiding the need to click through.
You see an instance of a module used within the code and want to jump to it immediately
instead of tracing the variable as follows:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Figure out how to resolve files within the package.
Run npm update -g dependents
in the shell.
Although, this may need to be altered due to Python sucking balls at executing anything in usr/local/bin
by default.
Will likely have to run /usr/local/bin/npm update -g dependents
Detect if the file exists, if so, then add to it. Otherwise, prepopulate it.
Right click menu on the entire file should now have an option to "Find dependents".
Possibly have multiple options:
Can the tool check the state of the loading indicator thread? Or does the plugin not have state?
Off by a leading slash
Currently only handles relative pathing one-level deep: ../
.
Should support more than that.
Specific example: https://github.com/jscs-dev/node-jscs/blob/61c51161392a7048dc313a33a83e11370e9b00d2/lib/options/preset.js#L3
Depends on dependents/node-dependents#44 when integrating https://github.com/mrjoelkemp/node-callers
Depends on dependents/node-dependents#22
Use the requirejs config to look up dependents.
Depends on dependents/node-dependents@d7920aa
Not sure which key binding to use.
Implementation:
Need to try/except the import statements
Strip out 'hgn!'
and such
Double check that both .
and ..
resolve properly.
For Behance, test that nbd relative paths resolve within the network's codebase.
This would avoid the need to duplicate args and also ease menus and such.
Root
A
C
B
D
Staggered view of the tree and dependencies
Use mrjoelkemp/node-dependency-tree
to get the tree
/usr/local/bin
is currently hardcoded
shutils
require(['foo/bar'], ...)
Fails because we currently only look for the dependency as a complete line instead of the string under the cursor.
Will then need to fall back to local install if a global is not found
Can use which dependents
to check for global install and then fall back to running the local node_modules/node-dependents/bin/dependents.js
if not found.
Pros:
Cons:
sudo npm install dependents
npm update -g dependents
will also update it if it's globally installedShim config will be used in addition to the require config to resolve paths
dependents
)Currently it's:
Should be:
Related to #8
Relevant references:
Tests pull in modules that you should be able to jump to.
Folks want to change the bindings permanently, not add on additional ones.
Specifying the root in the keymap implies that all of your projects have the same root name.
Solutions:
Each time the command is triggered, traverse up the directory tree to see the top-most directory that doesn't contain a .js file.
.dependentsrc
file in the root directory.root
and config
.editorconfig
Need to pass that to the node tool to use requirejs config to resolve paths
Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 526, in run_ return self.run() File "/Users/justinpagano/Library/Application Support/Sublime Text 3/Packages/Dependents/JumpToDependency.py", line 35, in run self.view.pathWithinRoot = self.view.filename[self.view.filename.index(self.window.root) + len(self.window.root):] ValueError: substring not found
Started getting this suddenly.
Often, you're in a module and want to know which app(s), not just containing modules, use it.
Will need to add support for this to node-dependents
.
mrjoelkemp/node-get-modules-to-build
to avoid computing the set of driver scripts each time.Create a test directory with sample apps for manual testing.
Apps:
Must include:
Dependents.py
and JumpToDependency.py
lib/
Create a long-running server that does the following:
This way, it's O(1) to modify the dependent matrix.
Pros:
Cons:
Possibly pickle?
Still need on save hook to recompute the matrix and flush to disk.
Need a way of refreshing the quick panel with the new items
Show stylesheets that import/depend-on the current partial
Jump to a partial using the same behavior as defined for JS files
Easy to isolate testing and development now that #5 via .deprc has landed. Use node-jscs as a testbed for commonjs module parsing. Use node-precinct
but see why it fails.
Depends on: dependents/node-dependents#22
UPDATE: Looked into this and it's not trivial. One of the many sources is the sass file that generated the css file. Imports are also listed as sources.
Will need to traverse the list of sources and jump to the one that's most similar to the current css file being jumped to.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Should just need a "sass_config"
that defines the root of the sass codebase. Jumping around should have the same logic as JS
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 524, in run_
return self.run(**args)
File "Dependents in /Users/jokemp/Library/Application Support/Sublime Text 3/Installed Packages/Dependents.sublime-package", line 21, in run
File "Dependents in /Users/jokemp/Library/Application Support/Sublime Text 3/Installed Packages/Dependents.sublime-package", line 46, in __init__
ValueError: substring not found
in test/sync.js trying to jump to dependency
https://github.com/mrjoelkemp/node-dependents
Should be used to do all the heavy lifting. Python then just issues a call, gets the results list by scraping stdout then populating the dropdown
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.