Skip to content

jmacedoit/atom-import-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Import Helper

Import Helper is an atom plugin that helps you adding es6 imports to your javascript code in an autocomplete fashion. If you use es6 imports, you might more often than not find yourself repeating this sequence:

  • You use a function from a library or other file in your project.
  • You realize you have to import this function.
  • You stop whatever you are doing to head to the top of your file and add the import.
  • Perhaps you don't remember the module from which you have to import so you check other files in your project where you have previously imported this function and copy paste the import.
  • You resume your work but you have to regain the mental context which you lost from performing all these steps.

With Import Helper you just have to place the cursor over the function/class you want to import and use the provided command to get a list of import suggestions from which you can chose. The selected import will be created or added to an existing import with the same source.

Demo

import-helper

How it works

Import Helper does not analyze file/node modules exports. Instead, it uses existing imports in your project as a base to provide import suggestions. This has some advantages. For instance, you won't have problem getting suggestions when using babel/webpack aliases. It also has some disadvantages: every new module needs to be imported manually at least once.

Support and future work

Import Helper does not yet resolve relative path imports having the directory of the file being worked on into account.

License

This project is licensed under the terms of MIT License

About

A utility that helps you adding es6 imports in atom.

Resources

Stars

Watchers

Forks

Packages

No packages published