mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +00:00
Add support LiveScript
This commit is contained in:
parent
6a9127baa9
commit
b72d7762fa
|
@ -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
|
|
@ -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
|
9
lib/fortune.ls
Normal file
9
lib/fortune.ls
Normal file
|
@ -0,0 +1,9 @@
|
|||
###
|
||||
# Fortune Cookie Reader v1.0
|
||||
# Released under the MIT License
|
||||
###
|
||||
|
||||
sayFortune = (fortune) ->
|
||||
console.log fortune # in bed!
|
||||
|
||||
exports.sayFortune = sayFortune
|
Loading…
Reference in New Issue
Block a user