UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

39 lines (33 loc) 861 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getGlobalCacheStorageName = getGlobalCacheStorageName; exports.getWebpackMode = getWebpackMode; exports.isDevelopmentMode = isDevelopmentMode; exports.isNotProduction = isNotProduction; exports.isProductionMode = isProductionMode; function isProductionMode(mode) { return mode === 'prod' || mode === 'production'; } function isDevelopmentMode(mode) { return mode === 'dev' || mode === 'development'; } function getWebpackMode(options) { const { mode } = options; return isProductionMode(mode) ? 'production' : 'development'; } function getGlobalCacheStorageName(options) { const { context } = options; return `${context}Jsonp`; } function isNotProduction(options) { const { mode } = options; return isProductionMode(mode) === false; }