Update server.rake
This commit is contained in:
parent
fcd81a7b14
commit
2a110a77ba
2 changed files with 4 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
|||
require "bundler/setup"
|
||||
require "nanoc"
|
||||
require "ryo"
|
||||
require "ryo/yaml"
|
||||
require "yaml"
|
||||
|
||||
begin
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
cwd = File.realpath File.join(__dir__, "..", "..", ".")
|
||||
desc "Start web server"
|
||||
task :server, [:protocol] do |_t, args|
|
||||
require "yaml"
|
||||
require "ryo"
|
||||
require "server"
|
||||
nanoc = Ryo.from(YAML.load_file("./nanoc.yaml"))
|
||||
nanoc = Ryo.from_yaml(path: File.join(cwd, "nanoc.yaml"))
|
||||
h = args.to_h
|
||||
p = h[:protocol] || "tcp"
|
||||
n = File.basename File.realpath(File.join(__dir__, "..", "..", "."))
|
||||
n = File.basename(cwd)
|
||||
o = if p == "unix"
|
||||
{unix: nanoc.server.unix.path}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue