Add 'rake format:apply'
This commit is contained in:
parent
ca8fe77554
commit
590e912066
2 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
namespace :format do
|
namespace :format do
|
||||||
|
desc "Apply all formats"
|
||||||
|
task apply: %i[format:rubocop:apply format:eslint:apply]
|
||||||
|
|
||||||
desc "Run rubocop (Ruby)"
|
desc "Run rubocop (Ruby)"
|
||||||
task :rubocop do
|
task :rubocop do
|
||||||
sh "bundle exec rubocop --config etc/rubocop.yml"
|
sh "bundle exec rubocop --config etc/rubocop.yml"
|
||||||
|
|
|
@ -9,10 +9,10 @@ task :server, [:protocol] do |_t, args|
|
||||||
p = h[:protocol] || "tcp"
|
p = h[:protocol] || "tcp"
|
||||||
n = File.basename(cwd)
|
n = File.basename(cwd)
|
||||||
o = if p == "unix"
|
o = if p == "unix"
|
||||||
{unix: nanoc.server.unix.path}
|
{unix: nanoc.server.unix.path}
|
||||||
else
|
else
|
||||||
{host: nanoc.server.tcp.host, port: nanoc.server.tcp.port}
|
{host: nanoc.server.tcp.host, port: nanoc.server.tcp.port}
|
||||||
end
|
end
|
||||||
s = Server.dir(nanoc.output_dir, o)
|
s = Server.dir(nanoc.output_dir, o)
|
||||||
Process.setproctitle "rake server[#{p}] [#{n}]"
|
Process.setproctitle "rake server[#{p}] [#{n}]"
|
||||||
if p == "unix"
|
if p == "unix"
|
||||||
|
|
Loading…
Reference in a new issue