mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 06:08:54 +00:00
first functioning program... hello world (Who'da thunk it?)
This commit is contained in:
parent
396b0cd58f
commit
dca3a9fd8c
1 changed files with 12 additions and 0 deletions
12
data/scripts/programs/Hello.js
Normal file
12
data/scripts/programs/Hello.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
var Hello = function() {
|
||||
}
|
||||
Hello.prototype = new Program();
|
||||
Hello.prototype.main = function(args) {
|
||||
this.output("hello world\n");
|
||||
this.exit(0);
|
||||
}
|
||||
|
||||
ProgramManager.programs.push({
|
||||
command: "hello",
|
||||
code: Hello
|
||||
})
|
Loading…
Reference in a new issue