al-quran.reflectslight.io/Rakefile.rb

43 lines
742 B
Ruby
Raw Normal View History

2022-11-02 04:49:43 +01:00
# frozen_string_literal: true
2022-10-31 19:34:23 +01:00
require "bundler/setup"
require_relative "lib/tasks"
include Tasks
namespace :nanoc do
task :compile do
sh "nanoc co"
end
end
2022-11-02 11:33:58 +01:00
task build: "nanoc:compile"
2022-10-31 19:34:23 +01:00
2022-11-03 23:09:51 +01:00
task server: ["nanoc:compile"] do
Dir.chdir(File.join(Dir.getwd, "build", "al-quran")) do
sh "ruby -S bundle exec adsf"
end
end
2022-10-31 19:34:23 +01:00
namespace :deploy do
task local: ["nanoc:compile"] do
Deploy::Local.call
end
task remote: ["nanoc:compile"] do
require "dotenv"
Dotenv.load
Deploy::Remote.call
end
2022-10-31 19:34:23 +01:00
end
2022-11-02 04:38:46 +01:00
namespace :linter do
task :ruby do
sh "bundle exec rubocop lib/ src/"
end
task :typescript do
sh "npm run eslint"
end
end
task lint: ["linter:ruby", "linter:typescript"]
2022-10-31 19:34:23 +01:00
task default: "deploy:local"