Sha256: 32e227a78bc758ddeb235b9f07cf67a98f77eeb92dcf60028309acc8fcc77087
Contents?: true
Size: 679 Bytes
Versions: 11
Compression:
Stored size: 679 Bytes
Contents
# frozen_string_literal: true require 'thor' require 'dato/dump/runner' module Dato module Dump class Cli < Thor package_name 'DatoCMS' desc 'dump', 'dumps DatoCMS contents into local files' option :config, default: 'dato.config.rb' option :token, default: ENV['DATO_API_TOKEN'], required: true def dump config_file = File.expand_path(options[:config]) client = Dato::Site::Client.new( options[:token], extra_headers: { 'X-Reason' => 'dump', 'X-SSG' => SsgDetector.new(Dir.pwd).detect } ) Runner.new(config_file, client).run end end end end
Version data entries
11 entries across 11 versions & 1 rubygems