diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index 3ccb8d0149777..2c00f44564bf8 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -1,7 +1,7 @@ { "name": "@kbn/i18n", - "browser": "./target/web/core", - "main": "./target/node/core", + "browser": "./target/web", + "main": "./target/node", "module": "./src/index.js", "version": "1.0.0", "license": "Apache-2.0", diff --git a/packages/kbn-i18n/src/angular/provider.js b/packages/kbn-i18n/src/angular/provider.js index 97fd160cc3554..e4f73b7de0db3 100644 --- a/packages/kbn-i18n/src/angular/provider.js +++ b/packages/kbn-i18n/src/angular/provider.js @@ -17,7 +17,7 @@ * under the License. */ -import * as i18n from '../core/i18n'; +import * as i18n from '../core'; export function i18nProvider() { this.addMessages = i18n.addMessages; diff --git a/packages/kbn-i18n/src/core/i18n/formats.js b/packages/kbn-i18n/src/core/formats.js similarity index 100% rename from packages/kbn-i18n/src/core/i18n/formats.js rename to packages/kbn-i18n/src/core/formats.js diff --git a/packages/kbn-i18n/src/core/i18n/helper.js b/packages/kbn-i18n/src/core/helper.js similarity index 100% rename from packages/kbn-i18n/src/core/i18n/helper.js rename to packages/kbn-i18n/src/core/helper.js diff --git a/packages/kbn-i18n/src/core/i18n/i18n.js b/packages/kbn-i18n/src/core/i18n.js similarity index 100% rename from packages/kbn-i18n/src/core/i18n/i18n.js rename to packages/kbn-i18n/src/core/i18n.js diff --git a/packages/kbn-i18n/src/core/index.js b/packages/kbn-i18n/src/core/index.js index 0eeef8faa7dde..af7c854ad979d 100644 --- a/packages/kbn-i18n/src/core/index.js +++ b/packages/kbn-i18n/src/core/index.js @@ -17,8 +17,5 @@ * under the License. */ -import * as i18nCore from './i18n'; -import * as loader from './loader'; - -export const i18n = i18nCore; -export const i18nLoader = loader; +export { formats } from './formats'; +export * from './i18n'; diff --git a/packages/kbn-i18n/src/core/i18n/locales.js b/packages/kbn-i18n/src/core/locales.js similarity index 100% rename from packages/kbn-i18n/src/core/i18n/locales.js rename to packages/kbn-i18n/src/core/locales.js diff --git a/packages/kbn-i18n/src/core/i18n/index.js b/packages/kbn-i18n/src/index.js similarity index 85% rename from packages/kbn-i18n/src/core/i18n/index.js rename to packages/kbn-i18n/src/index.js index af7c854ad979d..6988473539b82 100644 --- a/packages/kbn-i18n/src/core/i18n/index.js +++ b/packages/kbn-i18n/src/index.js @@ -17,5 +17,8 @@ * under the License. */ -export { formats } from './formats'; -export * from './i18n'; +import * as i18nCore from './core'; +import * as loader from './loader'; + +export const i18n = i18nCore; +export const i18nLoader = loader; diff --git a/packages/kbn-i18n/src/core/loader.js b/packages/kbn-i18n/src/loader.js similarity index 99% rename from packages/kbn-i18n/src/core/loader.js rename to packages/kbn-i18n/src/loader.js index a88a9e6a3674a..8718df3008e7c 100644 --- a/packages/kbn-i18n/src/core/loader.js +++ b/packages/kbn-i18n/src/loader.js @@ -29,7 +29,7 @@ import { readFile } from 'fs'; import { promisify } from 'util'; import { pick } from 'accept-language-parser'; import JSON5 from 'json5'; -import { unique } from './i18n/helper'; +import { unique } from './core/helper'; const asyncReadFile = promisify(readFile); diff --git a/packages/kbn-i18n/src/react/provider.js b/packages/kbn-i18n/src/react/provider.js index 96ed0e8b023ee..46e94863a0ba1 100644 --- a/packages/kbn-i18n/src/react/provider.js +++ b/packages/kbn-i18n/src/react/provider.js @@ -21,7 +21,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { IntlProvider } from 'react-intl'; -import * as i18n from '../core/i18n'; +import * as i18n from '../core'; /** * The library uses the provider pattern to scope an i18n context to a tree