mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
show commands Issue #63
This commit is contained in:
parent
f49937c935
commit
092a92b0b4
7 changed files with 154 additions and 7 deletions
110
build/bundle.js
110
build/bundle.js
|
@ -5591,6 +5591,16 @@ require.define("/src/js/intl/strings.js",function(require,module,exports,__dirna
|
|||
'zh_CN': '语言重置为默认的 {locale}'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-command': {
|
||||
'__desc__': 'command output title from "show"',
|
||||
'en_US': 'Please use one of the following commands for more info:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-all-commands': {
|
||||
'__desc__': 'command output title from "show commands"',
|
||||
'en_US': 'Here is a list of all the commmands available:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'cd-command': {
|
||||
'__desc__': 'dummy command output for the command in the key',
|
||||
'en_US': 'Directory changed to "/directories/dont/matter/in/this/demo"',
|
||||
|
@ -12806,6 +12816,19 @@ var instantCommands = [
|
|||
)
|
||||
});
|
||||
}],
|
||||
[/^show$/, function(bits) {
|
||||
var lines = [
|
||||
intl.str('show-command'),
|
||||
'<br/>',
|
||||
'show commands',
|
||||
'show solution',
|
||||
'show goal'
|
||||
];
|
||||
|
||||
throw new CommandResult({
|
||||
msg: lines.join('\n')
|
||||
});
|
||||
}],
|
||||
[/^locale (\w+)$/, function(bits) {
|
||||
constants.GLOBAL.locale = bits[1];
|
||||
|
||||
|
@ -12839,6 +12862,20 @@ var instantCommands = [
|
|||
throw new CommandResult({
|
||||
msg: msg
|
||||
});
|
||||
}],
|
||||
[/^show +commands$/, function(bits) {
|
||||
var allCommands = getAllCommands();
|
||||
var lines = [
|
||||
intl.str('show-all-commands'),
|
||||
'<br/>'
|
||||
];
|
||||
_.each(allCommands, function(regex, command) {
|
||||
lines.push(command);
|
||||
});
|
||||
|
||||
throw new CommandResult({
|
||||
msg: lines.join('\n')
|
||||
});
|
||||
}]
|
||||
];
|
||||
|
||||
|
@ -12860,6 +12897,24 @@ var regexMap = {
|
|||
'undo': /^undo($|\s)/
|
||||
};
|
||||
|
||||
var getAllCommands = function() {
|
||||
var toDelete = [
|
||||
'mobileAlert'
|
||||
];
|
||||
|
||||
var allCommands = _.extend(
|
||||
{},
|
||||
require('../git/commands').regexMap,
|
||||
require('../level').regexMap,
|
||||
regexMap
|
||||
);
|
||||
_.each(toDelete, function(key) {
|
||||
delete allCommands[key];
|
||||
});
|
||||
|
||||
return allCommands;
|
||||
};
|
||||
|
||||
exports.instantCommands = instantCommands;
|
||||
exports.parse = util.genParseCommand(regexMap, 'processSandboxCommand');
|
||||
|
||||
|
@ -23167,6 +23222,16 @@ require.define("/src/js/intl/strings.js",function(require,module,exports,__dirna
|
|||
'zh_CN': '语言重置为默认的 {locale}'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-command': {
|
||||
'__desc__': 'command output title from "show"',
|
||||
'en_US': 'Please use one of the following commands for more info:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-all-commands': {
|
||||
'__desc__': 'command output title from "show commands"',
|
||||
'en_US': 'Here is a list of all the commmands available:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'cd-command': {
|
||||
'__desc__': 'dummy command output for the command in the key',
|
||||
'en_US': 'Directory changed to "/directories/dont/matter/in/this/demo"',
|
||||
|
@ -24990,6 +25055,19 @@ var instantCommands = [
|
|||
)
|
||||
});
|
||||
}],
|
||||
[/^show$/, function(bits) {
|
||||
var lines = [
|
||||
intl.str('show-command'),
|
||||
'<br/>',
|
||||
'show commands',
|
||||
'show solution',
|
||||
'show goal'
|
||||
];
|
||||
|
||||
throw new CommandResult({
|
||||
msg: lines.join('\n')
|
||||
});
|
||||
}],
|
||||
[/^locale (\w+)$/, function(bits) {
|
||||
constants.GLOBAL.locale = bits[1];
|
||||
|
||||
|
@ -25023,6 +25101,20 @@ var instantCommands = [
|
|||
throw new CommandResult({
|
||||
msg: msg
|
||||
});
|
||||
}],
|
||||
[/^show +commands$/, function(bits) {
|
||||
var allCommands = getAllCommands();
|
||||
var lines = [
|
||||
intl.str('show-all-commands'),
|
||||
'<br/>'
|
||||
];
|
||||
_.each(allCommands, function(regex, command) {
|
||||
lines.push(command);
|
||||
});
|
||||
|
||||
throw new CommandResult({
|
||||
msg: lines.join('\n')
|
||||
});
|
||||
}]
|
||||
];
|
||||
|
||||
|
@ -25044,6 +25136,24 @@ var regexMap = {
|
|||
'undo': /^undo($|\s)/
|
||||
};
|
||||
|
||||
var getAllCommands = function() {
|
||||
var toDelete = [
|
||||
'mobileAlert'
|
||||
];
|
||||
|
||||
var allCommands = _.extend(
|
||||
{},
|
||||
require('../git/commands').regexMap,
|
||||
require('../level').regexMap,
|
||||
regexMap
|
||||
);
|
||||
_.each(toDelete, function(key) {
|
||||
delete allCommands[key];
|
||||
});
|
||||
|
||||
return allCommands;
|
||||
};
|
||||
|
||||
exports.instantCommands = instantCommands;
|
||||
exports.parse = util.genParseCommand(regexMap, 'processSandboxCommand');
|
||||
|
||||
|
|
1
build/bundle.min.35e609a6.js
Normal file
1
build/bundle.min.35e609a6.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/bundle.min.js
vendored
2
build/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -412,7 +412,7 @@
|
|||
For a much easier time perusing the source, see the individual files at:
|
||||
https://github.com/pcottle/learnGitBranching
|
||||
-->
|
||||
<script src="build/bundle.min.89f43a4b.js"></script>
|
||||
<script src="build/bundle.min.35e609a6.js"></script>
|
||||
|
||||
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
||||
The downside? No raw logs to parse for analytics, so I have to include
|
||||
|
|
|
@ -245,8 +245,13 @@ exports.strings = {
|
|||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-command': {
|
||||
'__desc__': 'command output from "show"',
|
||||
'en_US': 'Please one of the following commands for more info:'
|
||||
'__desc__': 'command output title from "show"',
|
||||
'en_US': 'Please use one of the following commands for more info:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'show-all-commands': {
|
||||
'__desc__': 'command output title from "show commands"',
|
||||
'en_US': 'Here is a list of all the commmands available:'
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
'cd-command': {
|
||||
|
|
|
@ -33,9 +33,9 @@ var instantCommands = [
|
|||
});
|
||||
}],
|
||||
[/^show$/, function(bits) {
|
||||
|
||||
lines = [
|
||||
var lines = [
|
||||
intl.str('show-command'),
|
||||
'<br/>',
|
||||
'show commands',
|
||||
'show solution',
|
||||
'show goal'
|
||||
|
@ -78,6 +78,20 @@ var instantCommands = [
|
|||
throw new CommandResult({
|
||||
msg: msg
|
||||
});
|
||||
}],
|
||||
[/^show +commands$/, function(bits) {
|
||||
var allCommands = getAllCommands();
|
||||
var lines = [
|
||||
intl.str('show-all-commands'),
|
||||
'<br/>'
|
||||
];
|
||||
_.each(allCommands, function(regex, command) {
|
||||
lines.push(command);
|
||||
});
|
||||
|
||||
throw new CommandResult({
|
||||
msg: lines.join('\n')
|
||||
});
|
||||
}]
|
||||
];
|
||||
|
||||
|
@ -99,6 +113,24 @@ var regexMap = {
|
|||
'undo': /^undo($|\s)/
|
||||
};
|
||||
|
||||
var getAllCommands = function() {
|
||||
var toDelete = [
|
||||
'mobileAlert'
|
||||
];
|
||||
|
||||
var allCommands = _.extend(
|
||||
{},
|
||||
require('../git/commands').regexMap,
|
||||
require('../level').regexMap,
|
||||
regexMap
|
||||
);
|
||||
_.each(toDelete, function(key) {
|
||||
delete allCommands[key];
|
||||
});
|
||||
|
||||
return allCommands;
|
||||
};
|
||||
|
||||
exports.instantCommands = instantCommands;
|
||||
exports.parse = util.genParseCommand(regexMap, 'processSandboxCommand');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue