Fix Rakefile.rb

This commit is contained in:
0x1eef 2023-06-30 16:06:20 -03:00
parent 7faf89e0f9
commit 9b25556084

View file

@ -1,8 +1,7 @@
# frozen_string_literal: true
require "bundler/setup"
require "ryo"
require "listen"
load "tasks/deploy.rake"
namespace :nanoc do
desc "Compile the website"
@ -13,12 +12,18 @@ namespace :nanoc do
desc "Delete the build directory"
task :clean do
require "yaml"
build_dir = Ryo.from(YAML.load_file("./nanoc.yaml")).output_dir
sh "rm -rf #{build_dir}"
end
end
desc "Build the website"
task build: "nanoc:compile"
desc "Clean the build directory"
task clean: "nanoc:clean"
desc "Start a Ruby web server on localhost"
task server: ["nanoc:compile"] do
Dir.chdir(File.join(Dir.getwd, "build", "al-quran")) do