include Utils in Rakefile.rb
This commit is contained in:
parent
b60cc0a075
commit
c0c3d7b8ec
3 changed files with 7 additions and 5 deletions
|
@ -4,7 +4,8 @@ require "bundler/setup"
|
|||
require "nanoc"
|
||||
require "ryo"
|
||||
require "ryo/yaml"
|
||||
require "yaml"
|
||||
require_relative "nanoc/lib/utils"
|
||||
include Utils
|
||||
|
||||
begin
|
||||
load "rake/tasks/deploy.rake"
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
##
|
||||
# The {Utils Utils} module provides methods that are
|
||||
# available at build time. Both ERB templates and the
|
||||
# Rules file have access to the methods of this module
|
||||
# available at build time. ERB templates, the Rules file
|
||||
# and Rakefile.rb all have access to the methods of this
|
||||
# module
|
||||
module Utils
|
||||
require "test-cmd"
|
||||
require_relative "utils/t"
|
||||
|
@ -78,4 +79,4 @@ module Utils
|
|||
include ERB
|
||||
include OpenGraph
|
||||
end
|
||||
use_helper Utils
|
||||
use_helper(Utils) if respond_to?(:use_helper)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :t do
|
||||
jsondir = File.join(Dir.getwd, "src", "json")
|
||||
jsondir = File.join(dirs.content, "json")
|
||||
desc "Generate /json/<locale>/<surahid>/info.json from surahs.json"
|
||||
task :"surahs.json" do
|
||||
require "json"
|
||||
|
|
Loading…
Reference in a new issue