Configure Eclipse for JavaScript (Node.js) development - rajivkanaujia/alphaworks GitHub Wiki
Note
- I have moved away from using Eclipse for Node development.
- The nodeclipse version is very old and that does not work with latest versions of Node if you want to use the debugger (e.g. --debug vs. --inspect etc)
- I have started to use Visual Source Code for JavaScript/Node/ReactJS development work.
Background
I use Homebrew to install most of the items on Mac. To setup Eclipse development environment for Node, you need to install Node and nvm.
Prerequisite
Before you continue, please read Eclipse Setup
Install node and nvm on your MacOS
$ brew install node
$ brew install nvm
Follow thru the instruction to configure nvm. Make sure you source the .bash_profile file.
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to
~/.bash_profile or your desired shell configuration file:
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations upon upgrade/reinstall.
Install nodeclipse
Use npm to install the package
$ npm install -g nodeclipse
/usr/local/bin/nodeclipse -> /usr/local/lib/node_modules/nodeclipse/bin/nodeclipse.js
/usr/local/bin/nci -> /usr/local/lib/node_modules/nodeclipse/bin/nci.js
/usr/local/bin/epm -> /usr/local/lib/node_modules/nodeclipse/bin/epm.js
/usr/local/lib
└─┬ [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
└── [email protected]
Install Enide Studio
This is a comprehensive package for JavaScript development from Eclipse Marketplace (via Help menu)
You can start a new project
You can convert an exiting artifacts to Eclipse Project
if ~/Development/workspace/jsproject
is your folder where all the JavaScript artifacts (code etc.), then use the sample command below to convert the folder content to a Eclipse project
$ cd ~/Development/workspace/jsproject
$ nodeclipse -g
In Eclipse/Enide select File -> Import... -> General / Existing Projects into Workspace
and enter project directory: /Users/rajiv/Development/jsproject
Visit http://www.nodeclipse.org/ for News, post Shares, Installing details, Features list,
Usage (incl Video, Demo) with all shortcuts, Help and Hints, Support options, Where Helping needed,
How to thank and Contact us, also History page.
Note: If you like the instructions here, please refer it on your posts/documentation. Contact me if there are corrections needed.