From 20ea9e5df7bf3257ed4e691b7a3a5abf9a4df921 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 17 May 2018 20:53:31 -0400 Subject: [PATCH] Bump frontend to 20180518.0 --- setup.py | 2 +- webpack.config.js | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 4cfc36194c..0a7ba51c7a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='home-assistant-frontend', - version='20180517.0', + version='20180518.0', description='The Home Assistant frontend', url='https://github.com/home-assistant/home-assistant-polymer', author='The Home Assistant Authors', diff --git a/webpack.config.js b/webpack.config.js index 3f6730df0f..4c9306e2a5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -33,27 +33,27 @@ function createConfig(isProdBuild, latestBuild) { ], }; + const copyPluginOpts = [ + { from: 'gulp/service-worker.js.tmpl', to: 'service_worker.js' }, + ]; + const plugins = [ new webpack.DefinePlugin({ __DEV__: JSON.stringify(!isProdBuild), __BUILD__: JSON.stringify(latestBuild ? 'latest' : 'es5'), __VERSION__: JSON.stringify(VERSION), - }) + }), + new CopyWebpackPlugin(copyPluginOpts), ]; if (latestBuild) { - plugins.push(CopyWebpackPlugin([ - { from: 'build-translations/output', to: `translations` }, - { from: 'node_modules/@polymer/font-roboto-local/fonts', to: 'fonts' }, - 'node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js', - { from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` }, - { from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` }, - { from: 'gulp/service-worker.js.tmpl', to: 'service_worker.js' }, - ])); + copyPluginOpts.push({ from: 'build-translations/output', to: `translations` }); + copyPluginOpts.push({ from: 'node_modules/@polymer/font-roboto-local/fonts', to: 'fonts' }); + copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js') + copyPluginOpts.push({ from: 'node_modules/leaflet/dist/leaflet.css', to: `images/leaflet/` }); + copyPluginOpts.push({ from: 'node_modules/leaflet/dist/images', to: `images/leaflet/` }); } else { - plugins.push(CopyWebpackPlugin([ - 'node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js', - ])); + copyPluginOpts.push('node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js'); babelOptions.presets = [ ['es2015', { modules: false }] ];