Help VS Code find the preview server (#16418)

This commit is contained in:
Paulus Schoutsen 2021-02-05 11:41:09 +01:00 committed by GitHub
parent 449d1c3819
commit b261f12c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,8 @@ task :preview, :listen do |t, args|
listen_addr = args[:listen] || '127.0.0.1'
listen_addr = '0.0.0.0' unless ENV['DEVCONTAINER'].nil?
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
puts "Starting to watch source with Jekyll and Compass."
puts "Now listening on http://localhost:#{server_port}"
system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
compassPid = Process.spawn("compass watch")