You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/03/08 21:05:12 UTC

[incubator-streampipes] branch dev updated: Disable ES5 build to fix build issue

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new d577166  Disable ES5 build to fix build issue
d577166 is described below

commit d5771667a902cba790fdd162a47e52d2940ba684
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Mar 8 22:04:59 2020 +0100

    Disable ES5 build to fix build issue
---
 ui/browserslist           |  18 +++++--
 ui/package.json           |   6 +--
 ui/webpack.config.base.js | 131 ----------------------------------------------
 ui/webpack.config.dev.js  |  60 ---------------------
 ui/webpack.config.js      |  21 --------
 ui/webpack.config.prod.js |  74 --------------------------
 6 files changed, 15 insertions(+), 295 deletions(-)

diff --git a/ui/browserslist b/ui/browserslist
index 166bd77..b18d5be 100644
--- a/ui/browserslist
+++ b/ui/browserslist
@@ -20,8 +20,16 @@
 # You can see what browsers were selected by your queries by running:
 #   npx browserslist
 
-> 0.5%
-last 2 versions
-Firefox ESR
-not dead
-not IE 9-11 # For IE 9-11 support, remove 'not'.
\ No newline at end of file
+#> 0.5%
+#last 2 versions
+#Firefox ESR
+#not dead
+#not IE 9-11 # For IE 9-11 support, remove 'not'.
+
+last 2 Chrome versions
+last 2 ChromeAndroid versions
+last 2 Safari versions
+last 2 iOS versions
+last 2 Firefox versions
+last 2 FirefoxAndroid versions
+last 2 Edge versions
\ No newline at end of file
diff --git a/ui/package.json b/ui/package.json
index 729cec4..c2cb577 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -9,11 +9,9 @@
   },
   "scripts": {
     "start": "node ./deployment/prebuild.js && ng serve",
-    "start-webpack": "node ./deployment/prebuild.js && webpack-dev-server -d --env=dev",
     "watchtest": "node ./deployment/prebuild.js && karma start ./karma.conf.js --no-auto-watch --single-run",
     "test": "node ./deployment/prebuild.js && karma start ./karma.conf.js",
-    "build": "node ./deployment/prebuild.js && set NODE_OPTIONS=--max-old-space-size=10192 && ng build --prod --stats-json",
-    "build-webpack": "node ./deployment/prebuild.js && webpack --display-modules --progress --env=prod",
+    "build": "node ./deployment/prebuild.js && set NODE_OPTIONS=--max-old-space-size=10192 && ng build --prod",
     "lint": "tslint -c tslint.json 'src/**/*.ts*"
   },
   "dependencies": {
@@ -150,4 +148,4 @@
     "webpack-bundle-analyzer": "^3.4.1",
     "webpack-merge": "^4.2.1"
   }
-}
\ No newline at end of file
+}
diff --git a/ui/webpack.config.base.js b/ui/webpack.config.base.js
deleted file mode 100644
index 503e71c..0000000
--- a/ui/webpack.config.base.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-const { AngularCompilerPlugin } = require('@ngtools/webpack');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const path = require('path');
-
-
-module.exports = {
-    entry: {
-        polyfills: './src/polyfills.ts',
-        main: './src/main.ts',
-        style: './src/scss/main.scss',
-    },
-    output: {
-        path: path.join(process.cwd(), 'dist'),
-        publicPath: '/',
-        filename: '[name].bundle.js',
-        crossOriginLoading: false,
-    },
-    module: {
-        rules: [
-            {
-                test: /\.ts$/,
-                loader: '@ngtools/webpack',
-            },
-            {
-                test: /\.html$/,
-                loader: 'raw-loader',
-            },
-            {
-                test: /\.css$/,
-                loaders: ['to-string-loader', 'css-loader'],
-            },
-            {
-                test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
-                loader: 'file-loader?name=assets/[name].[hash].[ext]',
-            },
-            {
-                test: /\.(scss|sass)$/,
-                use: [
-                    { loader: 'style-loader' },
-                    { loader: 'css-loader', options: { sourceMap: true } },
-                    { loader: 'sass-loader', options: { sourceMap: true } }
-                ],
-                include: path.join(__dirname, 'src',  'scss')
-            },
-            {
-                test: /\.(scss|sass)$/,
-                use: [
-                    'to-string-loader',
-                    { loader: 'css-loader', options: { sourceMap: true } },
-                    { loader: 'sass-loader', options: { sourceMap: true } }
-                ],
-                include: path.join(__dirname, 'src', 'app')
-            }
-        ],
-    },
-    resolve: {
-        alias: {
-            npm: path.join(__dirname, 'node_modules'),
-            legacy: path.join(__dirname, 'src', 'assets', 'lib'),
-            'jquery-ui': path.join(
-                __dirname,
-                'src',
-                'assets',
-                'lib',
-                'jquery-ui.min.js'
-            ),
-        },
-        extensions: ['.ts', '.js'],
-    },
-    plugins: [
-        new AngularCompilerPlugin({
-            mainPath: 'main.ts',
-            platform: 0,
-            sourceMap: false,
-            tsConfigPath: path.join(__dirname, 'src', 'tsconfig.app.json'),
-            skipCodeGeneration: false,
-            compilerOptions: {},
-        }),
-        new CopyWebpackPlugin(
-            [
-                {
-                    to: '',
-                    context: 'src/',
-                    from: {
-                        glob: 'assets/**/*',
-                        dot: true,
-                    },
-                },
-                {
-                    to: '',
-                    context: 'src/',
-                    from: {
-                        glob: '/favicon.ico',
-                        dot: true,
-                    },
-                },
-            ],
-            {
-                ignore: ['.gitkeep', '**/.DS_Store', '**/Thumbs.db'],
-                debug: 'warning',
-            }
-        ),
-        new MiniCssExtractPlugin(),
-        new HtmlWebpackPlugin({
-            template: 'src/index.html',
-            chunks: ['polyfills', 'main', 'style'],
-            chunksSortMode: 'manual',
-        }),
-    ],
-
-};
diff --git a/ui/webpack.config.dev.js b/ui/webpack.config.dev.js
deleted file mode 100644
index 74873a0..0000000
--- a/ui/webpack.config.dev.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-const merge = require('webpack-merge');
-const baseConfig = require('./webpack.config.base.js');
-
-module.exports = merge(baseConfig, {
-    mode: "development",
-    devServer: {
-        compress: true,
-        port: 8082,
-        proxy: {
-            '/streampipes-connect': {
-                target: 'http://localhost:8099',
-                pathRewrite: { '^/streampipes-connect': '' },
-                secure: false,
-            },
-            '/streampipes-backend': {
-                target: 'http://localhost:8030',
-                secure: false,
-            },
-            '/visualizablepipeline': {
-                target: 'http://localhost:5984',
-                secure: false,
-            },
-            '/dashboard': {
-                target: 'http://localhost:5984',
-                secure: false,
-            },
-            '/widget': {
-                target: 'http://localhost:5984',
-                secure: false,
-            },
-            '/pipeline': {
-                target: 'http://localhost:5984',
-                secure: false,
-            },
-            '/streampipes/ws': {
-                target: 'ws://localhost:61614',
-                ws: true,
-                secure: false,
-            },
-        },
-    },
-});
\ No newline at end of file
diff --git a/ui/webpack.config.js b/ui/webpack.config.js
deleted file mode 100644
index 4ecc904..0000000
--- a/ui/webpack.config.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-module.exports = (env) => {
-    return require(`./webpack.config.${env}.js`)
-}
\ No newline at end of file
diff --git a/ui/webpack.config.prod.js b/ui/webpack.config.prod.js
deleted file mode 100644
index 46cf734..0000000
--- a/ui/webpack.config.prod.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
-const { HashedModuleIdsPlugin } = require('webpack');
-const TerserPlugin = require('terser-webpack-plugin');
-const CompressionPlugin = require('compression-webpack-plugin')
-
-const merge = require('webpack-merge');
-const baseConfig = require('./webpack.config.base.js');
-
-module.exports = merge(baseConfig, {
-    mode: 'production',
-    plugins: [
-        new CompressionPlugin
-    ],
-    optimization: {
-        // noEmitOnErrors: true,
-        // runtimeChunk: 'single',
-        // splitChunks: {
-        //     cacheGroups: {
-        //         default: {
-        //             chunks: 'async',
-        //             minChunks: 2,
-        //             priority: 10
-        //         },
-        //         common: {
-        //             name: 'common',
-        //             chunks: 'async',
-        //             minChunks: 2,
-        //             enforce: true,
-        //             priority: 5
-        //         },
-        //         vendors: false,
-        //         vendor: false
-        //     }
-        // },
-        minimizer: [
-            // new HashedModuleIdsPlugin(),
-            new TerserPlugin({
-                terserOptions: {
-                    ecma: undefined,
-                    warnings: false,
-                    parse: {},
-                    compress: {},
-                    mangle: true, // Note `mangle.properties` is `false` by default.
-                    module: false,
-                    output: null,
-                    toplevel: false,
-                    nameCache: null,
-                    ie8: false,
-                    keep_classnames: false,
-                    keep_fnames: false,
-                    safari10: false,
-                },
-            }),
-        ]
-    }
-});
\ No newline at end of file