clio-lang / clio

Clio is a functional, parallel, distributed programming language.
https://clio-lang.org
Apache License 2.0
936 stars 30 forks source link

Feat watch #236

Open Mobilpadde opened 3 years ago

Mobilpadde commented 3 years ago

Description

I've requested this directly in the Telegram group. Though I didn't know how long to wait, so I decided to give it a go myself.

I decided to use chokidar as fs.watch can give problems on some platforms.

Changes proposed in this pull request

[npm.devDependencies]
rollup = "^2.56.2"
clio-rollup = "latest"
"@babel/preset-env" = "^7.15.0"
serve = "latest"

[npm.scripts]
host = "node .clio/host.js"
build = "rollup -c"
dev = "rollup -c -w"
start = "npm run build && serve public"

Instead of using sirv it's using serve, as sirv didn't reflect new changes to the built code.

ToDo

Note, this is the first large PR in forever. Hopefully it's done correctly :+1: