Localhost static website development environment for plain html, css and javascript files with live reload.
Uses gulp + browser-sync.
The following dependecies are used for this project. Feel free to experiment using other dependencies and versions.
- Windows 64-bit OS
- NodeJS
- node version 12.16.3
- npm version 6.14.4
- NodeJS modules (installed via npm)
- gulp v.4.0.2
- browser-sync v.2.26.7
-
Clone this repository.
https://github.com/weaponsforge/livereload-basic.git
-
Install dependencies.
npm install
-
Run the localhost static website development environment.
npm run dev
-
Edit the existing static files from the ./public directory and wait for live reload. Your updates will reflect on the web browser.
-
To include new static website files on live reload:
- Stop the localhost dev server.
- Create your new static (.html, .js, .css) files inside the ./public directory.
- Re-start the dev server.
npm run dev
-
Run the production static website (does not use live reload).
npm run start
[1] - live reload using gulp v.3.9.1 (older gulp version)
[2] - gulp notes (trello)
@weaponsforge
20200630