{"size": 1294, "ext": "js", "max_stars_repo_path": "plugin.js", "max_stars_repo_name": "donker/gulp-dnn-manifest", "max_stars_repo_stars_event_min_datetime": "2015-12-03T17:09:18.000Z", "max_stars_repo_stars_event_max_datetime": "2017-10-31T17:09:29.000Z", "max_issues_repo_path": "plugin.js", "max_issues_repo_name": "donker/gulp-dnn-manifest", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "plugin.js", "max_forks_repo_name": "donker/gulp-dnn-manifest", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.5319148936, "max_line_length": 70, "alphanum_fraction": 0.6406491499}
"use strict";
var dnnModule = require("./lib/module.js"),
  dnnSkin = require("./lib/skin.js"),
  dnnLibrary = require("./lib/library.js"),
  dnnPersonaBar = require("./lib/personabar.js"),
  extend = require("extend"),
  file = require("gulp-file");

var PLUGIN_NAME = "gulp-dnn-manifest";

module.exports = function(options, originalManifestFileName) {
  var defaults = {
    version: "01.00.00",
    dnn: {
      projectType: "module",
      packagesPath: "./_Packages",
      pathToAssemblies: "./bin",
      pathToScripts: "./_Installation/SQL",
      pathToSupplementaryFiles: "./_Installation",
      excludedPaths: ["node_modules", "_references"]
    }
  };
  var config = extend(true, {}, defaults, options || {});

  if (!config) {
    throw new PluginError(PLUGIN_NAME, "No configuration specified.");
  }

  var manifest = "";
  switch (config.dnn.projectType) {
    case "skin":
      manifest = dnnSkin(config);
      break;
    case "module":
      manifest = dnnModule(config, originalManifestFileName);
      break;
    case "library":
      manifest = dnnLibrary(config, originalManifestFileName);
      break;
    case "personabar":
      manifest = dnnPersonaBar(config, originalManifestFileName);
      break;
  }

  return file("version.dnn", manifest, { src: true });
};
