Skip to content

Commit

Permalink
feature(cloudcmd) add deepword
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 18, 2016
1 parent 7dab795 commit e746719
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

[DWORD]: https://github.com/cloudcmd/dword "Editor based on CodeMirror"
[EDWARD]: https://github.com/cloudcmd/edward "Editor based on Ace"
[DEEPWORD]: https://github.com/cloudcmd/deepword "Editor based on Monaco"
[EDWARD_KEYS]: https://github.com/cloudcmd/edward/#hot-keys "Edward Hot keys"
[TERMUX]: https://termux.com "Termux"
**Cloud Commander** orthodox web file manager with console and editor. Will help you manage the server and work with files, directories and programs in browser from any computer, mobile or tablet.
Expand All @@ -26,7 +27,7 @@ Benefits
- Server works on **Windows**, **Linux**, **Mac OS** and **Android** (with help of [Termux][TERMUX]).
- Could be used local or remotely.
- Adapting to screen size.
- **2 built-in editors** with support of **syntax highlighting**: [Dword][DWORD] and [Edward][EDWARD].
- **3 built-in editors** with support of **syntax highlighting**: [Dword][DWORD], [Edward][EDWARD] and [Deepword][DEEPWORD].
- [Console](https://github.com/cloudcmd/console "Console") with support of default OS command line.
- Written in **JavaScript/Node.js**.

Expand Down
16 changes: 16 additions & 0 deletions lib/cloudcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var DIR = __dirname + '/',
webconsole = require('console-io'),
edward = require('edward'),
dword = require('dword'),
deepword = require('deepword/legacy'),
spero = require('spero'),
remedy = require('remedy'),
ishtar = require('ishtar'),
Expand Down Expand Up @@ -127,6 +128,13 @@ function listen(prefix, socket) {
authCheck: authCheck
});

deepword.listen(socket, {
size: size,
root: root,
prefix: prefix + '/deepword',
authCheck: authCheck
});

spero.listen(socket, {
root: root,
prefix: prefix + '/spero',
Expand Down Expand Up @@ -184,6 +192,14 @@ function cloudcmd(prefix) {
zip : isZip
}),

deepword({
prefix : prefix + '/deepword',
minify : isMinify,
online : isOnline,
diff : isDiff,
zip : isZip
}),

spero({
prefix : prefix + '/spero',
minify : isMinify,
Expand Down
4 changes: 2 additions & 2 deletions lib/server/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
}

function editor(name) {
var reg = /^(dword|edward)$/;
var reg = /^(dword|edward|deepword)$/;

if (!reg.test(name))
exit('cloudcmd --editor: could be "dword" or "edward" only');
exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only');
}

})();
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"console-io": "^2.7.1",
"copymitter": "^1.8.0",
"criton": "^1.0.0",
"deepword": "^1.1.2",
"dword": "^3.2.0",
"edward": "^3.2.0",
"execon": "^1.2.0",
Expand Down
1 change: 1 addition & 0 deletions tmpl/config.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<select data-name="js-editor" class="form-control full-width" title="Editor">
<option {{ edward-selected }}>edward</option>
<option {{ dword-selected }}>dword</option>
<option {{ deepword-selected }}>deepword</option>
</select>
</li>
<li>
Expand Down

0 comments on commit e746719

Please sign in to comment.