function initOfflineConfig(offlineConfig, pkg, commonStaticResources) {
  offlineConfig.appName = `${pkg.name}`;
  offlineConfig.cacheVersion = `${pkg.name}-${pkg.version.replace(/\./g, '-')}`;

  offlineConfig.staticResources = offlineConfig.staticResources || [];
  offlineConfig.staticResources = offlineConfig.staticResources.concat(commonStaticResources).sort();
  offlineConfig.staticResources = offlineConfig.staticResources.filter(function (item, position) {
    return offlineConfig.staticResources.indexOf(item) === position;
  });
  offlineConfig.noCacheUrls = offlineConfig.noCacheUrls || [];

  return offlineConfig;
}

module.exports = initOfflineConfig;