From dfe72825102262f3f3a15ef7f581f25467028bc7 Mon Sep 17 00:00:00 2001 From: orangemug Date: Wed, 8 Nov 2017 10:13:02 +0000 Subject: [PATCH 1/3] Fixed some errors reported in google lighthouse audit tool. --- config/webpack.config.js | 9 ++++++++- package.json | 1 + src/components/icons/LineIcon.jsx | 2 +- src/components/icons/SymbolIcon.jsx | 4 ++-- src/components/layers/LayerListGroup.jsx | 4 ++-- src/manifest.json | 9 +++++++++ src/template.html | 1 + 7 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 src/manifest.json diff --git a/config/webpack.config.js b/config/webpack.config.js index 64de2056..24a28524 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -3,6 +3,7 @@ var webpack = require('webpack'); var path = require('path'); var loaders = require('./webpack.loaders'); var HtmlWebpackPlugin = require('html-webpack-plugin'); +var CopyWebpackPlugin = require('copy-webpack-plugin'); const HOST = process.env.HOST || "127.0.0.1"; const PORT = process.env.PORT || "8888"; @@ -59,6 +60,12 @@ module.exports = { new HtmlWebpackPlugin({ title: 'Maputnik', template: './src/template.html' - }) + }), + new CopyWebpackPlugin([ + { + from: './src/manifest.json', + to: 'manifest.json' + } + ]) ] }; diff --git a/package.json b/package.json index 94de1c9c..299501f6 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "babel-preset-react": "^6.24.1", "babel-runtime": "^6.26.0", "base64-loader": "^1.0.0", + "copy-webpack-plugin": "^4.2.0", "css-loader": "^0.28.7", "eslint": "^4.10.0", "eslint-plugin-react": "^7.4.0", diff --git a/src/components/icons/LineIcon.jsx b/src/components/icons/LineIcon.jsx index ab5acbdc..67e54035 100644 --- a/src/components/icons/LineIcon.jsx +++ b/src/components/icons/LineIcon.jsx @@ -6,7 +6,7 @@ export default class FillIcon extends React.Component { render() { return ( - + ) } diff --git a/src/components/icons/SymbolIcon.jsx b/src/components/icons/SymbolIcon.jsx index 941d9b97..961ba4e5 100644 --- a/src/components/icons/SymbolIcon.jsx +++ b/src/components/icons/SymbolIcon.jsx @@ -6,8 +6,8 @@ export default class SymbolIcon extends React.Component { render() { return ( - - + + ) diff --git a/src/components/layers/LayerListGroup.jsx b/src/components/layers/LayerListGroup.jsx index ccf7f384..ab36ab0e 100644 --- a/src/components/layers/LayerListGroup.jsx +++ b/src/components/layers/LayerListGroup.jsx @@ -10,7 +10,7 @@ export default class LayerListGroup extends React.Component { } render() { - return
+ return
  • this.props.onActiveToggle(!this.props.isActive)} > @@ -21,6 +21,6 @@ export default class LayerListGroup extends React.Component { isCollapsed={this.props.isActive} />
    -
  • + } } diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 00000000..bd9be0f1 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "Maputnik", + "short_name": "Maputnik", + "description": "Visual Map Designer", + "start_url": ".", + "display": "browser", + "background_color": "#1c1f24", + "theme_color": "#1c1f24" +} diff --git a/src/template.html b/src/template.html index 94eceb44..bfa8284c 100644 --- a/src/template.html +++ b/src/template.html @@ -4,6 +4,7 @@ <%= htmlWebpackPlugin.options.title %> +