Method: J1::Commands::Nbi.process

Defined in:
lib/j1/commands/nbi.rb

.process(args, options = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/j1/commands/nbi.rb', line 19

def process(args, options = {})
  timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
  if J1::Utils::is_project?
    if J1::Utils::is_project_setup?
      J1.logger.info "#{timestamp} - NBI: Exporting nbinteract textbooks ..."
      process = J1::Utils::Exec2.run('NBI','npm', 'run', 'nbi-export--all')
    else
      raise SystemExit
    end
  else
    raise SystemExit
  end
end