npm.io
0.2.0 • Published 4 years agoCLI

playscript

Licence
MIT
Version
0.2.0
Deps
0
Size
901 kB
Vulns
0
Weekly
0

PlayScript

A Tiny and Powerful feature packed framework for building progressive offline capable web apps, fast!

Features:

  • Top level async / await
  • JSX type syntax
  • Markdown & HTML templating
  • Local and remote module importing
  • Awesome life-saving API's
  • Prebuilt debugging tools
  • And a hell lot more!!

All packed in under half a megabyte and compatible with almost all web hosts, you will truly fall in love with it ( hopefully! ).

See demo usage below:

1.Install Playscript:

npm i playscript
# or
yarn add playscript

2.Create file index.ps...

3. Add this to your index file:
  app.route("/",res=>{
    var planet="Earth"
    res.send( <p> hello {{planet}}!</p> )
  }).port(3000)
4. Run script:
npx ps index.ps
# if installed globally
ps index.ps

And yes! this qualifies to be a PWA with offline capabilities! just head to your browser and visit http://localhost:3000 .


Guide

Contributors

PsJs is still in its early stages and will have breaking changes, please wait for a stable release before using in --prod. code is unobfuscated here. Contributions will be highly valued. xoxo

logo

Keywords