diff --git a/CHANGELOG.md b/CHANGELOG.md index 40840bd381e5e002ab9e53cbeead33c1feb278c8..a1ddf9e798c8d19f8a01c64b8efe02881b43979b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - A set of device specific favicons. ### Changed -- Now using the new SIFTA service +- Using Rollup/plugin-alias for module imports. +- Now using the new SIFTA service. - Changed headers on network page to match monitoring location pages. - Moved cooperators section to bottom of page. diff --git a/assets/rollup.config.js b/assets/rollup.config.js index b70cac3e1e9ab7947c382a4eccb2439edfab096f..5fe13e8dfb04f8b3bf701884733b7c869f2f4484 100644 --- a/assets/rollup.config.js +++ b/assets/rollup.config.js @@ -17,7 +17,7 @@ const {uglify} = require('rollup-plugin-uglify'); const env = process.env.NODE_ENV || 'development'; const getBundleConfig = function(src, dest) { - const hydrographEntries = [ + const entries = [ {find: 'ui', replacement: path.resolve(__dirname, 'src/scripts/')}, {find: 'ml', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location')}, {find:'d3render', replacement: path.resolve(__dirname, 'src/scripts/d3-rendering')}, @@ -26,16 +26,6 @@ const getBundleConfig = function(src, dest) { {find: 'ivhydrograph', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location/components/hydrograph')}, {find: 'network', replacement: path.resolve(__dirname, 'src/scripts/network')} ]; - const networkEntries = [ - {find: 'ml', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location')}, - {find: 'ui', replacement: path.resolve(__dirname, 'src/scripts/')}, - {find:'d3render', replacement: path.resolve(__dirname, 'src/scripts/d3-rendering')}, - {find: 'map', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location/components/map')}, - {find: 'dvhydrograph', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location/components/daily-value-hydrograph')}, - {find: 'ivhydrograph', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location/components/hydrograph')}, - {find: 'network', replacement: path.resolve(__dirname, 'src/scripts/network')} - ]; - const entries = src === 'src/scripts/monitoring-location/index.js' ? hydrographEntries : networkEntries; return { input: src, diff --git a/assets/src/scripts/d3-rendering/legend.spec.js b/assets/src/scripts/d3-rendering/legend.spec.js index 855555c5b2ab3ee99654a0fd13d2858c51a99e49..e4ed05caf82af1275d23f6ffbcba283774dc4525 100644 --- a/assets/src/scripts/d3-rendering/legend.spec.js +++ b/assets/src/scripts/d3-rendering/legend.spec.js @@ -1,6 +1,6 @@ import {select} from 'd3-selection'; import {lineMarker, rectangleMarker, textOnlyMarker} from 'd3render/markers'; -import {drawSimpleLegend} from './legend'; +import {drawSimpleLegend} from 'd3render/legend'; describe('Legend module', () => { diff --git a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.spec.js b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.spec.js index c751588bf44ecaafd69b3b8b5a6803e4cbbfb251..8f50e1797c22094e5dd10dc660a9cff684d872c9 100644 --- a/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.spec.js +++ b/assets/src/scripts/monitoring-location/components/daily-value-hydrograph/time-series-graph.spec.js @@ -3,7 +3,7 @@ import {select} from 'd3-selection'; import {configureStore} from 'ml/store'; import {Actions} from 'ml/store/daily-value-time-series'; -import {drawTimeSeriesGraph} from './time-series-graph'; +import {drawTimeSeriesGraph} from 'dvhydrograph/time-series-graph'; describe('monitoring-location/components/dailyValueHydrograph/time-series-graph', () => { const TEST_STATE = { diff --git a/assets/src/scripts/network/components/network-sites/legend.js b/assets/src/scripts/network/components/network-sites/legend.js index 6efcd7c7bdced6e34c8b1b7bbf651a1622b83bc0..35688bde38cf45991c142e5b88282cbdcb618fd6 100644 --- a/assets/src/scripts/network/components/network-sites/legend.js +++ b/assets/src/scripts/network/components/network-sites/legend.js @@ -7,7 +7,7 @@ import {listen} from 'ui/lib/d3-redux'; import {hasNetworkData} from 'network/selectors/network-data-selector'; -import {MARKER_FILL_COLOR, MARKER_FILL_OPACITY} from './map'; +import {MARKER_FILL_COLOR, MARKER_FILL_OPACITY} from 'network/components/network-sites/map'; /** * Creates the network legend if network data is available, otherwise removes the network legend if it exists. diff --git a/assets/src/scripts/network/index.js b/assets/src/scripts/network/index.js index 3faadd29923d2e3c903da0d226b0290fc69a0e2b..cc9aba7dd9037a0f5c9456004a729478e8020234 100644 --- a/assets/src/scripts/network/index.js +++ b/assets/src/scripts/network/index.js @@ -2,7 +2,7 @@ import 'ui/polyfills'; import wdfnviz from 'wdfn-viz'; -import {configureStore} from './store'; +import {configureStore} from 'network/store'; import {attachToNode as NetworkMapComponent} from 'network/components/network-sites'; diff --git a/assets/src/scripts/network/store/index.js b/assets/src/scripts/network/store/index.js index 231431cf94b827661a1d61183f96c7112b4f0b1c..a47d8bb65fbba4ff784ed6bcdcce395561d08ce8 100644 --- a/assets/src/scripts/network/store/index.js +++ b/assets/src/scripts/network/store/index.js @@ -1,9 +1,9 @@ import {applyMiddleware, createStore, combineReducers, compose} from 'redux'; import {default as thunk} from 'redux-thunk'; -import {fetchNetworkFeatures} from '../../web-services/network-data'; +import {fetchNetworkFeatures} from 'ui/web-services/network-data'; -import {networkDataReducer as networkData} from './network-data-reducer'; +import {networkDataReducer as networkData} from 'network/store/network-data-reducer'; export const Actions = { retrieveNetworkData(networkCd) { diff --git a/assets/src/scripts/network/store/index.spec.js b/assets/src/scripts/network/store/index.spec.js index 29f3114e5db2996526ecb9ddb31a4d619c9f665c..961a1585a9bccfa4d0c39c7611a58a07632e9b0d 100644 --- a/assets/src/scripts/network/store/index.spec.js +++ b/assets/src/scripts/network/store/index.spec.js @@ -1,6 +1,6 @@ import config from 'ui/config'; -import {Actions, configureStore} from './index'; +import {Actions, configureStore} from 'network/store/index'; const MOCK_NETWORK_FEATURE = ` { diff --git a/assets/src/scripts/network/store/network-data-reducer.spec.js b/assets/src/scripts/network/store/network-data-reducer.spec.js index 01a19358b8fcea7ada3ad68e74739a8c65e3f369..530d9675748e9b0af46f69f5b27b90b53f226201 100644 --- a/assets/src/scripts/network/store/network-data-reducer.spec.js +++ b/assets/src/scripts/network/store/network-data-reducer.spec.js @@ -1,4 +1,4 @@ -import {networkDataReducer} from './network-data-reducer'; +import {networkDataReducer} from 'network/store/network-data-reducer'; describe('network-data-reducer', () => {