Skip to content

Commit

Permalink
Update whats new (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xintong Xia committed Oct 30, 2019
1 parent f5011fe commit 9b06684
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
12 changes: 11 additions & 1 deletion docs/whats-new.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# react-map-gl v5.1

Release date: Oct 30, 2019

## Highlights

- **New Components**: [`Layer`](/#/Documentation/api-reference/layer) and [`Source`](/#/Documentation/api-reference/source) have been added to provide better React parity with the `Mapbox GL JS` API.
- **Viewport transition**: `transitionDuration` can be set to `'auto'` when using [`FlyToInterpolator`](/#/Documentation/api-reference/fly-to-interpolator).
- **New Example**: Add an [example](https://uber.github.io/react-map-gl/#/Examples/draw-polygon) with drawing library [react-map-gl-draw](https://github.com/uber/nebula.gl/tree/master/modules/react-map-gl-draw).

# react-map-gl v5.0

Release date: May 31, 2019
Expand All @@ -14,7 +24,7 @@ Release date: Mar 14, 2019

## Highlights

- **New Components**: [`FullscreenControl`](/#/Documentation/api-reference/fullscreen-control.md), [`GeolocateControl`](/#/Documentation/api-reference/geolocate-control.md) have been added to provide better React parity with the `Mapbox GL JS` API.
- **New Components**: [`FullscreenControl`](/#/Documentation/api-reference/fullscreen-control), [`GeolocateControl`](/#/Documentation/api-reference/geolocate-control) have been added to provide better React parity with the `Mapbox GL JS` API.
- **New callback props** `InteractiveMap` supports more callbacks:
+ `onNativeClick`

Expand Down
11 changes: 5 additions & 6 deletions website/src/constants/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import ExamplesComponent from '../components/examples';
import PagesComponent from '../components/page';

function getDocUrl(filename) {
return `docs/${filename}`;
// DOCS_DIR specified in webpack config file
// eslint-disable-next-line no-undef
return `${DOCS_DIR}/docs/${filename}`;
}

// mapping from file path in source to generated page url
Expand Down Expand Up @@ -164,13 +166,10 @@ const docPages = {
{
name: 'SVGOverlay',
content: getDocUrl('overlays/svg-overlay.md')
},
}
]
}
])
};

export const Pages = [
examplePages,
docPages
];
export const Pages = [examplePages, docPages];
7 changes: 6 additions & 1 deletion website/webpack/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ module.exports = Object.assign(config, {

devtool: 'cheap-source-maps',

plugins: config.plugins.concat([new webpack.HotModuleReplacementPlugin()])
plugins: config.plugins.concat([
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
DOCS_DIR: JSON.stringify('.')
})
])
});
11 changes: 9 additions & 2 deletions website/webpack/prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const config = require('./config');
const webpack = require('webpack');
const {resolve} = require('path');
const config = require('./config');

module.exports = Object.assign(config, {

Expand All @@ -16,5 +17,11 @@ module.exports = Object.assign(config, {
'react-map-gl': resolve('../src'),
'../utils/mapboxgl': resolve('../node_modules/mapbox-gl'),
}
}
},

plugins: config.plugins.concat([
new webpack.DefinePlugin({
DOCS_DIR: JSON.stringify('https://raw.githubusercontent.com/uber/react-map-gl/master')
})
])
});

0 comments on commit 9b06684

Please sign in to comment.