Installing Browser-sync

Source: Internet
Author: User

Browser-sync is a very useful way to access the Web page from different terminals by a web address given on the same LAN, which greatly solves the predicament that we have to install various environments or software because the Web page needs to be browsed on the phone or ipad. Now let me take a look at the process of installing this awesome plugin:

1, first of all, you have to ensure that you have a node. JS environment on your computer, then we use the Terminal node. JS Package Manager NPM To do the next thing;

2, the implementation of NPM install-g Browser-sync;

3, followed by the implementation of Browser-sync this step I have a big problem, because the computer does not have the X-code tool installed, but we first execute: sudo npm install npm-g, to ensure that we install the node version is the latest, and then check your version , the execution order is npm-v,node-v;

4, Next we will formally start the creation of the project, now create a folder on the desktop: Execute
mkdir Liuhuan-browsersync (here is the file name);

5, the implementation of CD Liuhuan-browsersync; go to the folder.

6, the implementation of NPM Init; Here is the creation of repository information, all the way to enter;

7, the implementation of NPM install Browser-sync-save-dev; This step is to install Browser-sync in the folder, right, need to install in node once, folder installed once;

8, the implementation of LS; See if there is a node_modules this item;

9, execute LS node_modules, see if there is browser-sync this folder;

To use in a project:

Copy the well-written project folder directly to the Liuhuan-browsersync folder or create a new project folder directly in the Liuhuan-browsersync folder.
Then open the Terminal CD folder name here is the CD Desktop/liuhuan-browsersync,
And then execute
Browser-sync start-server Web-app (project folder name)-files "web-app/*"


Installing Browser-sync

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.