#!/usr/bin/env node
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = render;

var _functions = require("./functions");

var _utils = require("../utils");

/**
 *
 * @param {string} path path to source JSON files of a course/nanodegree
 * @param {string} targetDir target directory to save the contents
 */
async function render(path, targetDir) {
  try {
    await (0, _functions.renderCourse)(path, targetDir);
  } catch (error) {
    _utils.logger.error((0, _utils.getFullErrorMessage)(error));
  }
}