aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/nuldoc/Rakefile
blob: 811398f4d40a7db00cbc3aa208770ae27bc6c846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rubocop/rake_task'
require_relative 'lib/nuldoc'

RuboCop::RakeTask.new

desc 'Build the site'
task :build do
  config = Nuldoc::ConfigLoader.load_config(Nuldoc::ConfigLoader.default_config_path)
  Nuldoc::Commands::Build.run(config)
end

desc 'Start development server'
task :serve, [:site] do |_t, args|
  config = Nuldoc::ConfigLoader.load_config(Nuldoc::ConfigLoader.default_config_path)
  Nuldoc::Commands::Serve.run(config, site_name: args[:site], no_rebuild: false)
end

desc 'Create new content'
task :new, [:type] do |_t, args|
  config = Nuldoc::ConfigLoader.load_config(Nuldoc::ConfigLoader.default_config_path)
  Nuldoc::Commands::New.run(config, type: args[:type], date: nil)
end