From c42c9f8be5aa37514a1129a0bdab046480e197e4 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 10 Jul 2014 10:29:39 -0400 Subject: [PATCH] feature(cloudcmd) add exports.start --- HELP.md | 20 +++++++++++++++----- bin/cloudcmd.js | 7 +++---- cloudcmd.js | 6 ++++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/HELP.md b/HELP.md index 0a0af28f..f7ae0432 100644 --- a/HELP.md +++ b/HELP.md @@ -33,16 +33,26 @@ Install The installation of file manager is very simple. - install [node.js](http://nodejs.org/ "node.js") if you still have not. -- install ```cloudcmd``` via ```npm``` with one simple command. +- install ```cloudcmd``` via ```npm``` with: + + + npm install cloudcmd #local install + +or + + npm install cloudcmd -g #global install + ![NPM_INFO][NPM_INFO_IMG] Start --------------- -To start **Cloud Commander** only one command needed: - - node cloudcmd -or if you install with `-g` flag just type: +To start **Cloud Commander** change directory to `node_modules/cloudcmd` and +run command: + + node bin/cloudcmd + +or if you install with `-g` flag just type in any directory: cloudcmd diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index 174f51f0..88f21a26 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -1,12 +1,11 @@ #!/usr/bin/env node -/* cloudcmd binary - * usage: node cloudcmd - */ (function(){ 'use strict'; - require('../cloudcmd'); + var CloudCmd = require('../cloudcmd'); + + CloudCmd.start(); })(); diff --git a/cloudcmd.js b/cloudcmd.js index b466ed1a..c635c62d 100644 --- a/cloudcmd.js +++ b/cloudcmd.js @@ -48,8 +48,10 @@ /* reinit main dir os if we on Win32 should be backslashes */ DIR = main.DIR; - readConfig(init); - win.prepareCodePage(); + exports.start = function() { + readConfig(init); + win.prepareCodePage(); + }; /** * additional processing of index file