Giter Club home page Giter Club logo

gulp-browser-serve's Introduction

A Gulp Template for Serving Files from a Root Folder and Refreshing the Browser

(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.

Installation

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.

Usage for the Default Browser

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.

Usage for Non-default Browsers

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.

Scaffold

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.

gulp-browser-serve's People

Contributors

code-warrior avatar roy-vanegas avatar

Watchers

 avatar  avatar  avatar

gulp-browser-serve's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.