Skip to content

Instantly share code, notes, and snippets.

@jinwei233
jinwei233 / watch.rb
Created February 13, 2018 08:59 — forked from JamieMason/watch.rb
mac上监控文件变化,并刷新页面 Watch a folder for changes to files, then reload Chrome
#!/usr/bin/env ruby
require 'tempfile'
require 'fileutils'
# Signals
trap("SIGINT") { exit }
# Setup
TARGET_FOLDER = ARGV[0]
TARGET_URL = ARGV[1]