十五年测试老手,长期负责WEB\APP 项目测试,目前主要负责团队管理工作。
BrowserSync 測試多個平台
上一篇 /
下一篇 2015-03-21 09:50:47
/ 个人分类:测试工具相关
Vi(d}-b @C%x0
1. Install Node.js
BrowserSync is a module for Node.js, a platform. for fast network applications. There are convenient installers for MacOS, Windows and Linux.51Testing软件测试网UIp3Sy7|
2. Install BrowserSync
The Node.js package manager (npm) is used to install BrowserSync from a repository. Open a terminal window and run the following command:
Wu,Lt#h0npm install -g browser-sync
You’re telling the package manager to download the BrowserSync files and install them globally so they’re available to all your projects.51Testing软件测试网l8xV
@-L3iHZ p
3. Start BrowserSync
A basic use is to watch all CSS files in the css
directory and update connected browsers if a change occurs. Navigate your terminal window to a project and run the appropriate command:
:eKQ%V@n0f\E0Static sites
If you’re only using .html
files, you’ll need to use the server mode. BrowserSync will start a mini-server and provide a URL to view your site.51Testing软件测试网)Z
ltw_!wv
browser-sync start --server --files "css/*.css"
Dynamic sites
If you’re already running a local server with PHP or similar, you’ll need to use the proxy mode. BrowserSync will wrap your vhost with a proxy URL to view your site.51Testing软件测试网CE4S`h&Ped$j)i
browser-sync start --proxy "myproject.dev" --files "css/*.css"
[8R)V C/i051Testing软件测试网g/o^#vvaA
E
BrowserSync 是用 node.js 寫的工具,可以同時測試一堆 device,修改後不用按 reload,印象中已經有套件可以做類似的事情?51Testing软件测试网&t