{"size": 563, "ext": "js", "max_stars_repo_path": "configs/env.js", "max_stars_repo_name": "franksoong/webpack-seed", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "configs/env.js", "max_issues_repo_name": "franksoong/webpack-seed", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "configs/env.js", "max_forks_repo_name": "franksoong/webpack-seed", "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.7666666667, "max_line_length": 58, "alphanum_fraction": 0.6536412078}
import path from 'path';


export const __dev__  = "development";
export const __prod__ = "production";

export const devPort  = 3000;
export const prodPort = 8080;

export const basePath = path.join(__dirname, '..', 'src');
export const outPath = path.join(__dirname, '..', 'out');

let env = {
    mode: "development",
    port: devPort,
    //others
};

//get from env
export function getEnv(key){
    return env[key];
};

//set to env
export default (config) => {
    Object.assign(env, config);

    //enhance node env
    Object.assign(process.env, env);
};