Skip to content

Commit e746719

Browse files
committed
feature(cloudcmd) add deepword
1 parent 7dab795 commit e746719

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

HELP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
[DWORD]: https://github.com/cloudcmd/dword "Editor based on CodeMirror"
1212
[EDWARD]: https://github.com/cloudcmd/edward "Editor based on Ace"
13+
[DEEPWORD]: https://github.com/cloudcmd/deepword "Editor based on Monaco"
1314
[EDWARD_KEYS]: https://github.com/cloudcmd/edward/#hot-keys "Edward Hot keys"
1415
[TERMUX]: https://termux.com "Termux"
1516
**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.
@@ -26,7 +27,7 @@ Benefits
2627
- Server works on **Windows**, **Linux**, **Mac OS** and **Android** (with help of [Termux][TERMUX]).
2728
- Could be used local or remotely.
2829
- Adapting to screen size.
29-
- **2 built-in editors** with support of **syntax highlighting**: [Dword][DWORD] and [Edward][EDWARD].
30+
- **3 built-in editors** with support of **syntax highlighting**: [Dword][DWORD], [Edward][EDWARD] and [Deepword][DEEPWORD].
3031
- [Console](https://github.com/cloudcmd/console "Console") with support of default OS command line.
3132
- Written in **JavaScript/Node.js**.
3233

lib/cloudcmd.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var DIR = __dirname + '/',
2121
webconsole = require('console-io'),
2222
edward = require('edward'),
2323
dword = require('dword'),
24+
deepword = require('deepword/legacy'),
2425
spero = require('spero'),
2526
remedy = require('remedy'),
2627
ishtar = require('ishtar'),
@@ -127,6 +128,13 @@ function listen(prefix, socket) {
127128
authCheck: authCheck
128129
});
129130

131+
deepword.listen(socket, {
132+
size: size,
133+
root: root,
134+
prefix: prefix + '/deepword',
135+
authCheck: authCheck
136+
});
137+
130138
spero.listen(socket, {
131139
root: root,
132140
prefix: prefix + '/spero',
@@ -184,6 +192,14 @@ function cloudcmd(prefix) {
184192
zip : isZip
185193
}),
186194

195+
deepword({
196+
prefix : prefix + '/deepword',
197+
minify : isMinify,
198+
online : isOnline,
199+
diff : isDiff,
200+
zip : isZip
201+
}),
202+
187203
spero({
188204
prefix : prefix + '/spero',
189205
minify : isMinify,

lib/server/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
}
2323

2424
function editor(name) {
25-
var reg = /^(dword|edward)$/;
25+
var reg = /^(dword|edward|deepword)$/;
2626

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

3131
})();

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"console-io": "^2.7.1",
8989
"copymitter": "^1.8.0",
9090
"criton": "^1.0.0",
91+
"deepword": "^1.1.2",
9192
"dword": "^3.2.0",
9293
"edward": "^3.2.0",
9394
"execon": "^1.2.0",

tmpl/config.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<select data-name="js-editor" class="form-control full-width" title="Editor">
4646
<option {{ edward-selected }}>edward</option>
4747
<option {{ dword-selected }}>dword</option>
48+
<option {{ deepword-selected }}>deepword</option>
4849
</select>
4950
</li>
5051
<li>

0 commit comments

Comments
 (0)