Mix Mixin
into Rules
This commit is contained in:
parent
c34ba4d0a6
commit
7530169fa3
1 changed files with 9 additions and 9 deletions
18
Rules
18
Rules
|
@ -10,20 +10,20 @@ require "nanoc-gzip"
|
|||
require "nanoc-webpack"
|
||||
require "nanoc-tidy"
|
||||
|
||||
##
|
||||
# Locals
|
||||
locales = %w[ar fa en]
|
||||
json_dir = File.join(Dir.getwd, "src", "json")
|
||||
name_by_id = Ryo.from_json(path: File.join(json_dir, "nameById.json"))
|
||||
tdata = Ryo.from_json(path: File.join(json_dir, "t.json"))
|
||||
tidy = `which tidy || which tidy5`.chomp
|
||||
buildenv = ENV["buildenv"] || "development"
|
||||
|
||||
##
|
||||
# Extensions
|
||||
[Nanoc::RuleDSL::CompilationRuleContext, Nanoc::RuleDSL::CompilerDSL].each { _1.prepend(Mixin) }
|
||||
Nanoc::RuleDSL::CompilationRuleContext.prepend(Nanoc::Extension::AnonymousFilter)
|
||||
Nanoc::RuleDSL::CompilerDSL.prepend(Nanoc::Extension::RequireRules)
|
||||
|
||||
##
|
||||
# Locals
|
||||
locales = %w[ar fa en]
|
||||
name_by_id = Ryo.from_json(path: File.join(dirs.content, "json", "nameById.json"))
|
||||
tdata = Ryo.from_json(path: File.join(dirs.content, "json", "t.json"))
|
||||
tidy = `which tidy || which tidy5`.chomp
|
||||
buildenv = ENV["buildenv"] || "development"
|
||||
|
||||
##
|
||||
# Plugins
|
||||
Nanoc::Webpack
|
||||
|
|
Loading…
Reference in a new issue