diff --git a/helloworld.coffee b/helloworld.coffee index 3ae8fe2..a9c3e90 100644 --- a/helloworld.coffee +++ b/helloworld.coffee @@ -24,6 +24,6 @@ main = (args) -> console.log bitlist.join(',') console.log JSON.stringify(kids) console.log "Hello world, CoffeeScript" - console.log fortune.sayFortune("Foutune!") + fortune.sayFortune("foutune!") exports.main = main \ No newline at end of file diff --git a/helloworld.ls b/helloworld.ls index dfbc084..169be1c 100644 --- a/helloworld.ls +++ b/helloworld.ls @@ -1,3 +1,5 @@ +fortune = require "lib/fortune.ls" + # Easy listing of implicit objects table1 = * id: 1 @@ -19,5 +21,6 @@ main = (args) -> console.log JSON.stringify(table1) console.log JSON.stringify(table2) console.log "Hello world, LiveScript" - + fortune.sayFortune "fortune!" + exports.main = main \ No newline at end of file diff --git a/lib/fortune.ls b/lib/fortune.ls new file mode 100644 index 0000000..97732a4 --- /dev/null +++ b/lib/fortune.ls @@ -0,0 +1,9 @@ +### +# Fortune Cookie Reader v1.0 +# Released under the MIT License +### + +sayFortune = (fortune) -> + console.log fortune # in bed! + +exports.sayFortune = sayFortune \ No newline at end of file