Open xgqfrms opened 4 years ago
# test
$ browser-sync start --server --files "./index.html"
$ browser-sync start --server --files "./web-notification/*.*"
# $ browser-sync start --server --files "./web-notification/index.html"
http://localhost:3000/index.html http://localhost:3000/web-notification/index.html
# step 1
$ npm install -g browser-sync
# OR
$ npm i -g browser-sync
# step 2
$ cd build
# step 3
$ browser-sync start --server --files "./*.html"
$ browser-sync start --server --files "public/*.*"
$ browser-sync start --server --files "./src/**/*.*"
$ browser-sync start --server --files "./public/**/*.*"
# http://localhost:3000/public/index.html
# 必须使用正确的路径
# 1. 在 project 根目录下,运行命令, 默认的 url 根路由,就是当前的路径
# browser-sync start --server --files "./dist/**/*.*"
# 访问 http://localhost:3000/dist/index.html
# 2. 直接在 dist 目录下,运行命令, 默认的 url 根路由,就是当前的路径
# browser-sync start --server --files "./**/*.*"
# 访问 http://localhost:3000/index.html
Web Notification API
https://www.cnblogs.com/xgqfrms/p/11169370.html