hg demo starting

This commit is contained in:
Peter Cottle 2013-08-01 10:43:27 -07:00
parent 24b4fcd1cd
commit 8e128020d7
5 changed files with 88 additions and 66 deletions

View file

@ -6056,30 +6056,38 @@ var initDemo = function(sandbox) {
// being the smart programmer I am (not), I dont include a true value on demo, so // being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here // I have to check if the key exists here
var commands;
if (params.hasOwnProperty('demo')) { if (params.hasOwnProperty('demo')) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { commands = [
eventBaton.trigger( "git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;",
'commandSubmitted', "delay 1000; reset;",
[ "level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;",
"git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;", "delay 2000; show goal; delay 1000; hide goal;",
"delay 1000; reset;", "git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;",
"level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;", "git checkout another; git rebase side; git rebase another master;",
"delay 2000; show goal; delay 1000; hide goal;", "help; levels"
"git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;", ];
"git checkout another; git rebase side; git rebase another master;", } else if (params.hasOwnProperty('hgdemo')) {
"help; levels" commands = [
].join('')); 'importTreeNow {"branches":{"master":{"target":"C3","id":"master"},"side":{"target":"C2","id":"side"},"debug":{"target":"C4","id":"debug"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C1"],"id":"C3"},"C4":{"parents":["C2"],"id":"C4"}},"HEAD":{"target":"side","id":"HEAD"}}',
}); 'delay 5000',
'git rebase master',
'delay 5000',
'undo',
'hg rebase -d master'
];
commands = commands.join(';#').split('#');
} else if (!params.hasOwnProperty('NODEMO')) { } else if (!params.hasOwnProperty('NODEMO')) {
commands = [
"git help;",
"delay 1000;",
"help;",
"levels"
];
}
if (commands) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger( eventBaton.trigger('commandSubmitted', commands.join(''));
'commandSubmitted',
[
"git help;",
"delay 1000;",
"help;",
"levels"
].join(''));
}); });
} }
@ -24021,30 +24029,38 @@ var initDemo = function(sandbox) {
// being the smart programmer I am (not), I dont include a true value on demo, so // being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here // I have to check if the key exists here
var commands;
if (params.hasOwnProperty('demo')) { if (params.hasOwnProperty('demo')) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { commands = [
eventBaton.trigger( "git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;",
'commandSubmitted', "delay 1000; reset;",
[ "level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;",
"git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;", "delay 2000; show goal; delay 1000; hide goal;",
"delay 1000; reset;", "git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;",
"level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;", "git checkout another; git rebase side; git rebase another master;",
"delay 2000; show goal; delay 1000; hide goal;", "help; levels"
"git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;", ];
"git checkout another; git rebase side; git rebase another master;", } else if (params.hasOwnProperty('hgdemo')) {
"help; levels" commands = [
].join('')); 'importTreeNow {"branches":{"master":{"target":"C3","id":"master"},"side":{"target":"C2","id":"side"},"debug":{"target":"C4","id":"debug"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C1"],"id":"C3"},"C4":{"parents":["C2"],"id":"C4"}},"HEAD":{"target":"side","id":"HEAD"}}',
}); 'delay 5000',
'git rebase master',
'delay 5000',
'undo',
'hg rebase -d master'
];
commands = commands.join(';#').split('#');
} else if (!params.hasOwnProperty('NODEMO')) { } else if (!params.hasOwnProperty('NODEMO')) {
commands = [
"git help;",
"delay 1000;",
"help;",
"levels"
];
}
if (commands) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger( eventBaton.trigger('commandSubmitted', commands.join(''));
'commandSubmitted',
[
"git help;",
"delay 1000;",
"help;",
"levels"
].join(''));
}); });
} }

File diff suppressed because one or more lines are too long

1
build/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -445,7 +445,7 @@
For a much easier time perusing the source, see the individual files at: For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching https://github.com/pcottle/learnGitBranching
--> -->
<script src="build/bundle.min.4a67e733.js"></script> <script src="build/bundle.js"></script>
<!-- The advantage of github pages: super-easy, simple, slick static hostic. <!-- 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 The downside? No raw logs to parse for analytics, so I have to include

View file

@ -124,30 +124,38 @@ var initDemo = function(sandbox) {
// being the smart programmer I am (not), I dont include a true value on demo, so // being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here // I have to check if the key exists here
var commands;
if (params.hasOwnProperty('demo')) { if (params.hasOwnProperty('demo')) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { commands = [
eventBaton.trigger( "git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;",
'commandSubmitted', "delay 1000; reset;",
[ "level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;",
"git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;", "delay 2000; show goal; delay 1000; hide goal;",
"delay 1000; reset;", "git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;",
"level advanced1 --noFinishDialog --noStartCommand --noIntroDialog;", "git checkout another; git rebase side; git rebase another master;",
"delay 2000; show goal; delay 1000; hide goal;", "help; levels"
"git checkout bugFix; git rebase master; git checkout side; git rebase bugFix;", ];
"git checkout another; git rebase side; git rebase another master;", } else if (params.hasOwnProperty('hgdemo')) {
"help; levels" commands = [
].join('')); 'importTreeNow {"branches":{"master":{"target":"C3","id":"master"},"side":{"target":"C2","id":"side"},"debug":{"target":"C4","id":"debug"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C1"],"id":"C3"},"C4":{"parents":["C2"],"id":"C4"}},"HEAD":{"target":"side","id":"HEAD"}}',
}); 'delay 5000',
'git rebase master',
'delay 5000',
'undo',
'hg rebase -d master'
];
commands = commands.join(';#').split('#');
} else if (!params.hasOwnProperty('NODEMO')) { } else if (!params.hasOwnProperty('NODEMO')) {
commands = [
"git help;",
"delay 1000;",
"help;",
"levels"
];
}
if (commands) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() { sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger( eventBaton.trigger('commandSubmitted', commands.join(''));
'commandSubmitted',
[
"git help;",
"delay 1000;",
"help;",
"levels"
].join(''));
}); });
} }