slakscript
v1.0.1
Published
slaklang client side script compiler
Downloads
2
Readme
slakscript
slakscript is a front end script for my other module slakLang, is has the same english santax, and is very easy to use , replacing math santax with simple words
how to use slakscript
install :
npm i slakscript
on your server :
const express = require("express")
const app = express()
const slakscript = require("slakscript")
app.use(slakscript)
app.use("/",express.static("public"))
app.listen(2020)
on your html files :
<script type="text/javascript" src="/slakscript.js" async></script>
<!-- and to use slakscript -->
<script type="text/slakscript">
number is 1
if(number bigger than 5){
console.log("number is bigger than 10")
}else if(number smaller than 5){
console.log("number is smaller than 5")
}
</script>
i made is also posible to combine this with coffeescript, and this was my result :
<!DOCTYPE html>
<script type="text/javascript" src="slakscript.js" async></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/coffee-script/1.7.1/coffee-script.min.js" defer></script>
<script type="text/slakscript" src="coffee">
number is 1
if number bigger than 5
console.log "number is bigger than 10"
elseif number smaller than 5
console.log "number is smaller than 5"
</script>
the script looks almost english right?
for more info visit
npm slaklang