Just go to Settings (Ctrl+,) → Install, then search require-anywhere
, and click Install
apm install require-anywhere
git clone https://github.com/ksxatompackages/require-anywhere
apm link ./require-anywhere
apm develop require-anywhere ./require-anywhere
cd ./require-anywhere
npm install
- Add external node module directories to
global.module.paths
to allow Atom users torequire
any node modules they want
- See also: windows.js
Include all paths that match ${left}\${mid}\${right}
or ${left}\${right}
, where:
-
${left}
is windows environment variable, one of:%UserProfile%
,%AppData%
,%ProgramFiles%
,%ProgramFiles(x86)%
,%ProgramFiles(x64)%
,%ProgramW6432%
,%HomeDrive%
-
${mid}
is one of:nodejs
,nodejs\repl
,npm
-
${right}
is one of:atom-node-modules
,atom-dev-node-modules
,node_modules
,.node_modules
,.node_libraries
- See also: unix.js
Include all paths that match ${left}/${right}
, where:
-
${left}
is one of:~
,~/repl
,/home
,/home/repl
,/usr/share
,/
,/nodejs
,/node
-
${right}
is one of:atom-node-modules
,atom-dev-node-modules
,node_modules
,.node_modules
,.node_libraries
Just go to Settings (Ctrl+,) → Packages → require-anywhere, then do something
You need to reload Atom to apply settings