cloudcmd v12.2.0
User Menu
In Cloud Commander v12.2.0
was added new long awaiting feature User Menu
.
You can enable it with help of a flag --user-menu
(consider that file rename using F2
will be disabled, but you can use Shift
+ F6
or F2
- F2
).
When you press F2
Cloud Commander will read a file .cloudcmd.menu.js
by walking up parent directories, if can't read it will try to read ~/.cloudcmd.menu.js
.
Let's consider example user menu
works file:
module.exports = {
'F2 - Rename file': async ({DOM}) => {
await DOM.renameCurrent();
},
'D - Build Dev': async ({CloudCmd}) => {
await CloudCmd.TerminalRun.show({
command: 'npm run build:client:dev',
autoClose: false,
closeMessage: 'Press any button to close Terminal',
});
CloudCmd.refresh();
},
'P - Build Prod': async ({CloudCmd}) => {
await CloudCmd.TerminalRun.show({
command: 'npm run build:client',
autoClose: true,
});
CloudCmd.refresh();
},
};
You will have ability to run one of this 3 commands with help of double click, enter, or binded key (F2
, D
or P
in this example). Also you can run commands in terminal, or execute any built-in function of Cloud Commander
extended it's interface.
User Menu API
Here you can find API
that can be used in User Menu. DOM and CloudCmd to main objects you receive in arguments list using destructuring.
DOM contains all base functions of Cloud Commander
(rename, remove, download etc);
renameCurrent
- shows renames current file dialog, and does renaming.
CloudCmd contains all modules (Terminal
, View
, Edit
, Config
, Console
etc);
TerminalRun
- module that showsTerminal
with acommand
from options and closes terminal when everything is done.
fix
- feature(npmignore) add fixture.json
- (operation) set-listeners: alert: noCancel -> cancel
- (cloudcmd) different title
feature
- (key) add ability to rename file with Shift + F6
- (user-menu) add (#221)
- (package) clean-css-loader v2.0.0
- (package) edward v11.0.0
- (npmignore) add fixture.json
- (package) dword v11.0.0
- (package) smalltalk v3.4.0
- (package) eslint v6.0.0-alpha
- (package) eslint-plugin-node v9.0.1
- (config) speed up load: series -> parallel
- (cloudcmd) avoid service worker reoload scripts in dev mode
- (package) putout v4.23.0
- (package) nyc v14.0.0