Skip to content
A VSCode extension for requiring node.js files / modules
Branch: master
Clone or download
Pull request Compare This branch is 69 commits ahead, 5 commits behind bitkompagniet:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.vscode
resources/images
src
test
typings
.eslintignore
.eslintrc.json
.gitignore
.vscodeignore
CHANGELOG.md
README.md
jsconfig.json
package.json
yarn.lock

README.md

This module can import or require node modules and local files.

Use the command dialog or the shortcut Ctrl+Shift+1. You can also use Ctrl+Shift+2 to import/require and insert the reference at the current cursor position.

Require Example

For destructuring import use ctrl+shift+3. First select module, then select one or more export properties.

Destructuring Example

Features

  • Require core modules, dependencies / devDependencies or local files.
  • New requires will be added to the end of the require block in top of file.
  • The style (import vs require) will be auto-detected one a per-file level. It will ask for the first dependency.
  • Typical naming substitutions (for example, lodash will be named _ and jQuery will be $).
  • If the import already exists, it will not add a duplicate.

Acknowledgements

This module is a fork from Bitkompagniet Node Require, which was itself a fork of Quick Require. The typical namings were taken from NodeRequirer for Sublime Text.

You can’t perform that action at this time.