Few Useful Command Line Commands for Node.js

2016/4/152 min read
bookmark this

Few commands

--save-dev install npm module and update package.json file.

npm install --save-dev gulp-zip

npm init will help you to create package.json file.

npm init

bower init will help you through to create bower.json file.

bower init

dirlist all directory under current path


intall all the module at package.json.

npm install -d

Few my favorite node modules

gulp-ssh use ssh, but you have to setup ssh at the server first.

npm install --save-dev gulp-ssh

gulp-zip use zip, module to create zip.

npm install --save-dev gulp-zip

gulp-ftp ftp, sending file via ftp.

npm install --save-dev gulp-ftp

gulp-sftp sftp, sending file via sftp.

npm install --save-dev gulp-sftp

delete node_modules folder by use rimraf, windows can't delete files if path is too long, one choice you can't use rimraf

// install rimraf gloablly
npm install rimraf -g
// delete node_modules folder
rimraf node_modules

Another choice is Shift + delete to delete files or folder at windows