{"size": 584, "ext": "js", "max_stars_repo_path": "config/dev.env.js", "max_stars_repo_name": "UnnamedXAer/job-offers", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "config/dev.env.js", "max_issues_repo_name": "UnnamedXAer/job-offers", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "config/dev.env.js", "max_forks_repo_name": "UnnamedXAer/job-offers", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.25, "max_line_length": 67, "alphanum_fraction": 0.5702054795}
'use strict';
const merge = require('webpack-merge');
const prodEnv = require('./prod.env');

let { parsed: dotEnv } = require('dotenv').config();

console.log('dotenv: ', dotEnv);

if (!dotEnv) {
  dotEnv = {};
}

for (const key in dotEnv) {
  if (!dotEnv[key].startsWith('"')) {
    dotEnv[key] = '"' + dotEnv[key] + '"';
  }

  if (!dotEnv[key].startsWith('"') || !dotEnv[key].endsWith('"')) {
    console.error(
      "error: env variable '" + key + "' have missing double quote"
    );
  }
}

module.exports = merge(
  prodEnv,
  {
    NODE_ENV: '"development"'
  },
  dotEnv
);
