diff --git a/.travis.yml b/.travis.yml index 6de5183a1e..5f149e10ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,8 @@ language: node_js cache: yarn -# nodejs version from nvmrc -# yarn install is default install lifecycle script: - yarn global add codecov -g - - yarn build:ts --noEmit && yarn lint && yarn test --coverage + - yarn build && yarn lint && yarn test --coverage after_success: - codecov - yarn semantic-release diff --git a/src/index.ts b/src/index.ts index 3dd8d6cbf2..907bb09a2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,9 @@ export { Position, Rendering, Rotation } from './lib/series/specs'; export * from './lib/themes/theme'; export { LIGHT_THEME } from './lib/themes/light_theme'; export { DARK_THEME } from './lib/themes/dark_theme'; +export * from './lib/themes/theme_commons'; export { CurveType } from './lib/series/curves'; -export { niceTimeFormatter } from './utils/data/formatters'; +export { timeFormatter, niceTimeFormatter, niceTimeFormatByDay } from './utils/data/formatters'; export { DataGenerator } from './utils/data_generators/data_generator'; +export { DataSeriesColorsValues } from './lib/series/series'; +export { CustomSeriesColorsMap } from './lib/series/specs'; diff --git a/stories/area_chart.tsx b/stories/area_chart.tsx index 38896ac753..6726f1537c 100644 --- a/stories/area_chart.tsx +++ b/stories/area_chart.tsx @@ -9,9 +9,9 @@ import { Position, ScaleType, Settings, + timeFormatter, } from '../src'; import { KIBANA_METRICS } from '../src/lib/series/utils/test_dataset_kibana'; -import { timeFormatter } from '../src/utils/data/formatters'; const dateFormatter = timeFormatter('HH:mm'); storiesOf('Area Chart', module) diff --git a/stories/bar_chart.tsx b/stories/bar_chart.tsx index f08f57471f..39515202e3 100644 --- a/stories/bar_chart.tsx +++ b/stories/bar_chart.tsx @@ -10,13 +10,14 @@ import { getAxisId, getSpecId, LIGHT_THEME, + niceTimeFormatByDay, Position, ScaleType, Settings, + timeFormatter, } from '../src/'; import * as TestDatasets from '../src/lib/series/utils/test_dataset'; import { KIBANA_METRICS } from '../src/lib/series/utils/test_dataset_kibana'; -import { niceTimeFormatByDay, timeFormatter } from '../src/utils/data/formatters'; storiesOf('Bar Chart', module) .add('basic', () => { diff --git a/stories/interactions.tsx b/stories/interactions.tsx index 618565ac8a..f018df1373 100644 --- a/stories/interactions.tsx +++ b/stories/interactions.tsx @@ -6,6 +6,7 @@ import { Axis, BarSeries, Chart, + CurveType, getAxisId, getSpecId, LineSeries, @@ -17,7 +18,6 @@ import { import { boolean } from '@storybook/addon-knobs'; import { DateTime } from 'luxon'; -import { CurveType } from '../src/lib/series/curves'; import * as TestDatasets from '../src/lib/series/utils/test_dataset'; const onElementListeners = { diff --git a/stories/legend.tsx b/stories/legend.tsx index 1ca2c4db01..af65ea5927 100644 --- a/stories/legend.tsx +++ b/stories/legend.tsx @@ -1,3 +1,4 @@ +import { boolean } from '@storybook/addon-knobs'; import { storiesOf } from '@storybook/react'; import React from 'react'; import { @@ -11,7 +12,6 @@ import { Settings, } from '../src/'; import * as TestDatasets from '../src/lib/series/utils/test_dataset'; -import { boolean } from '@storybook/addon-knobs'; storiesOf('Legend', module) .add('right', () => { @@ -135,8 +135,7 @@ storiesOf('Legend', module) ); }) .add('changing specs', () => { - const splitSeries = boolean('split series', true) ? - ['g1', 'g2'] : undefined; + const splitSeries = boolean('split series', true) ? ['g1', 'g2'] : undefined; return ( @@ -166,4 +165,3 @@ storiesOf('Legend', module) ); }); - diff --git a/stories/line_chart.tsx b/stories/line_chart.tsx index 4192466cab..d2441acd8b 100644 --- a/stories/line_chart.tsx +++ b/stories/line_chart.tsx @@ -7,13 +7,15 @@ import { getAxisId, getSpecId, LineSeries, + niceTimeFormatByDay, Position, ScaleType, Settings, + timeFormatter, } from '../src/'; import { KIBANA_METRICS } from '../src/lib/series/utils/test_dataset_kibana'; -import { niceTimeFormatByDay, timeFormatter } from '../src/utils/data/formatters'; const dateFormatter = timeFormatter(niceTimeFormatByDay(1)); + storiesOf('Line Chart', module) .add('basic', () => { return ( diff --git a/stories/styling.tsx b/stories/styling.tsx index 183165f1b8..593c5e1d62 100644 --- a/stories/styling.tsx +++ b/stories/styling.tsx @@ -9,8 +9,11 @@ import { BarSeries, Chart, CurveType, + CustomSeriesColorsMap, DARK_THEME, DataGenerator, + DataSeriesColorsValues, + DEFAULT_MISSING_COLOR, getAxisId, getSpecId, LIGHT_THEME, @@ -21,10 +24,7 @@ import { ScaleType, Settings, } from '../src/'; -import { DataSeriesColorsValues } from '../src/lib/series/series'; -import { CustomSeriesColorsMap } from '../src/lib/series/specs'; import * as TestDatasets from '../src/lib/series/utils/test_dataset'; -import { DEFAULT_MISSING_COLOR } from '../src/lib/themes/theme_commons'; function range( title: string, diff --git a/stories/utils.ts b/stories/utils.ts deleted file mode 100644 index e69de29bb2..0000000000