pixelastic / norska

🏔️ Custom SSG using Pug, Webpack, PostCSS and Tailwind.
https://projects.pixelastic.com/norska/
MIT License
8 stars 0 forks source link

Move away from live-server as dependency #55

Closed pixelastic closed 3 years ago

pixelastic commented 4 years ago

live-server hasn't been updated for a long time and uses latest as the version number for two of its dependencies (colors and opn). opn has been deprecated in favor of open

In the short term, this results in warning when installing `norska:

warning Pattern ["colors@latest"] is trying to unpack in the same destination "/home/tim/.cache/yarn/v6/npm-colors-1.4.0-c50491479d4c1bdaed2c9ced32cf7c7dc2360f78-integrity/node_modules/colors" as pattern ["colors@^1.1.2","colors@^1.1.2","colors@^1.2.1"]. This could result in non-deterministic behavior, skipping.

https://github.com/tapio/live-server

pixelastic commented 4 years ago

I couldn't find a suitable replacement.

serve does not have live-reload (https://github.com/vercel/serve)

So maybe time to write my own? https://khtdr.com/tutorials/simple-live-reload-server.html

pixelastic commented 3 years ago

What I need is a local http server that:

pixelastic commented 3 years ago

I have implemented some logic in norska-serve. It starts an express server that forward requests to specific folder. It also adds the live-reload script to the page.

I could extract it into its own module, to give it a proper command line interface, but I don't feel the need right now, so this will do for now.