Update Rakefile.rb
This commit is contained in:
parent
5e8b89fe58
commit
d080d1277c
2 changed files with 4 additions and 7 deletions
|
@ -1,13 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/setup"
|
||||
require "nanoc"
|
||||
require "ryo"
|
||||
require "yaml"
|
||||
|
||||
begin
|
||||
load "rake/tasks/deploy.rake"
|
||||
rescue LoadError
|
||||
warn "[warn] #{$!.class}: #{$!.message}"
|
||||
rescue LoadError => ex
|
||||
warn "[warn] #{ex.class}: #{ex.message}"
|
||||
end
|
||||
load "rake/tasks/format.rake"
|
||||
load "rake/tasks/nanoc.rake"
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/setup"
|
||||
require "nanoc"
|
||||
cwd = File.realpath File.join(__dir__, "..", "..")
|
||||
|
||||
namespace :nanoc do
|
||||
desc "Clean directories"
|
||||
task :clean do
|
||||
|
@ -22,8 +19,7 @@ namespace :nanoc do
|
|||
desc "Produce the build directory on-demand"
|
||||
task :watch, %i[buildenv] => %i[setenv nanoc:build] do |t, args|
|
||||
require "listen"
|
||||
path = File.join(Dir.getwd, "src")
|
||||
Listen.to(path) do
|
||||
Listen.to(File.join(cwd, "src")) do
|
||||
Nanoc::CLI.run(["compile"])
|
||||
end.start
|
||||
sleep
|
||||
|
|
Loading…
Reference in a new issue