(v0.1.0)
Note: You’ll need to have Java installed before you continue.
This repository provides a simple command line interface, or CLI, tool that launches your default browser and refreshes the browser anytime a file is changed in the root folder, making the development of simple static web projects easier by not having to manually reload the browser.
If your project uses JavaScript, Babel is included for transpiling ES6 to ES5. Transpiled files are written to a folder generated by Gulp called temp
.
This tool also provides the option to use a browser other than your operating system’s default browser. See the Usage sections for more.
Testing has been carried out in Windows 10, Mac OS X 10.12+, and Fedora Linux.
All the required Node modules need to be installed before you proceed. From the root of this repo, type npm i
, which will create a folder called node_modules
and download the plugins listed under the devDependencies
section in the package.json
file. If you encounter an ERR!
message on a Mac or Linux about EACCES
, then you’ll need to run the command as the super user: sudo npm i
.
Type gulp serve
and wait a moment. Your default browser will launch in a localhost
environment that looks for index.html
. When you’re done, type ctrl+c
.
To use any of the non-default browsers, type gulp BROWSER serve
, where BROWSER
is one of the browsers listed when you type gulp --tasks
. To use Firefox, For example, I’d type gulp firefox serve
.
For browser refreshes, this tool continuously polls all HTML files in the root, CSS files in the css
folder, and JavaScript files in the js
folder.