1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-15 07:08:56 +09:00
cherrypick/src/utils/environmentInfo.ts
2017-05-24 20:50:17 +09:00

15 lines
398 B
TypeScript

import Logger from './logger';
export default class {
public static show(): void {
const env = process.env.NODE_ENV;
const logger = new Logger('Env');
logger.info(typeof env == 'undefined' ? 'NODE_ENV is not set' : `NODE_ENV: ${env}`);
if (env !== 'production') {
logger.warn('The environment is not in production mode');
logger.warn('Do not use for production purpose');
}
}
}