Import-js plugins now support atmosphere packages with mainModule (Sublime/Atom/VSCode/Vim/Emac)

The latest version of Import-js — which helps you import modules — has just been updated to support atmosphere packages!

Here’s a quick example of using it to import a modules from a local package:

import-js-meteor

Also works for non-local packages, Meteor core packages, on top of the usual npm and relative imports.

Disclaimer: Not my project, but was my PR that added api.mainModule support from Meteor packages

4 Likes

Nice tool~ I wish it supports WebStorm.

Me too, my colleague uses WebStorm and always gripes about having to type out the whole import every time

1 Like

Can you share your importjs.js configuration?

Here’s the one that I’m using at the moment, filtering out the meteor globals so that they are imported (which still doesn’t work for 'fix all imports')

const globals = require('globals');
module.exports = {
    declarationKeyword: 'import',
    environments: ['meteor', 'node'],
    globals: Object.keys(globals).filter(name => name !== 'meteor'),
    useRelativePaths: false
};
1 Like