mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
uiux(@embark/cli): propose build --contracts as alternative if
compile` is used
This commit is contained in:
parent
3986d9761c
commit
70a61c5965
@ -412,9 +412,18 @@ class Cmd {
|
|||||||
program
|
program
|
||||||
.action(function(cmd) {
|
.action(function(cmd) {
|
||||||
console.log((__('unknown command') + ' "%s"').red, cmd);
|
console.log((__('unknown command') + ' "%s"').red, cmd);
|
||||||
|
|
||||||
|
let suggestion;
|
||||||
|
|
||||||
|
if (cmd == 'compile') {
|
||||||
|
// we bypass `utils.proposeAlternative()` here as `build` isn't
|
||||||
|
// similar enough
|
||||||
|
suggestion = 'build --contracts';
|
||||||
|
} else {
|
||||||
let utils = require('../lib/utils/utils.js');
|
let utils = require('../lib/utils/utils.js');
|
||||||
let dictionary = ['new', 'demo', 'build', 'run', 'blockchain', 'simulator', 'test', 'upload', 'version', 'console', 'eject-webpack', 'graph', 'help', 'reset'];
|
let dictionary = ['new', 'demo', 'build', 'run', 'blockchain', 'simulator', 'test', 'upload', 'version', 'console', 'eject-webpack', 'graph', 'help', 'reset'];
|
||||||
let suggestion = utils.proposeAlternative(cmd, dictionary);
|
suggestion = utils.proposeAlternative(cmd, dictionary);
|
||||||
|
}
|
||||||
if (suggestion) {
|
if (suggestion) {
|
||||||
console.log((__('did you mean') + ' "%s"?').green, suggestion);
|
console.log((__('did you mean') + ' "%s"?').green, suggestion);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user