summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/minimumApp
diff options
context:
space:
mode:
authorherbert <herbert.eiselt@highstreet-technologies.com>2019-12-14 00:06:42 +0100
committerherbert <herbert.eiselt@highstreet-technologies.com>2019-12-14 00:07:02 +0100
commitda4fd6169717cfa04d644d0af0d23dd089a6e373 (patch)
tree3c7a2c804b001349dc24852f7e488061a2f733f4 /sdnr/wt/odlux/apps/minimumApp
parent58f412ad18c1daf622e54ed36db6014f4e04f3f7 (diff)
remove old version
of devicemodel devicemanager oldux featureaggregator Issue-ID: SDNC-1004 Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com> Change-Id: I5337643181e2398e5a8097e4ee14fa4ac96d0d4c
Diffstat (limited to 'sdnr/wt/odlux/apps/minimumApp')
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/.babelrc17
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/.fbExcludeFilterFile25
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/package.json40
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/pom.xml161
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src/handlers/minimumAppRootHandler.ts37
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src/index.html24
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src/plugin.tsx48
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java68
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml9
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java46
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/src2/test/resources/test.js5
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/tsconfig.json37
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/webpack.config.js136
13 files changed, 0 insertions, 653 deletions
diff --git a/sdnr/wt/odlux/apps/minimumApp/.babelrc b/sdnr/wt/odlux/apps/minimumApp/.babelrc
deleted file mode 100644
index 3d8cd1260..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/.babelrc
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "presets": [
- ["@babel/preset-react"],
- ["@babel/preset-env", {
- "targets": {
- "chrome": "66"
- },
- "spec": true,
- "loose": false,
- "modules": false,
- "debug": false,
- "useBuiltIns": "usage",
- "forceAllTransforms": true
- }]
- ],
- "plugins": []
-}
diff --git a/sdnr/wt/odlux/apps/minimumApp/.fbExcludeFilterFile b/sdnr/wt/odlux/apps/minimumApp/.fbExcludeFilterFile
deleted file mode 100644
index 3cd2303d3..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/.fbExcludeFilterFile
+++ /dev/null
@@ -1,25 +0,0 @@
-<FindBugsFilter>
- <Match>
- <Or>
- <Package name="~.*protobuff\.messages.*" />
- <Package name="~org\.opendaylight\.yang\.gen\..*" />
- <Package name="~org\.opendaylight\.controller\.config\.yang\.config\..*" />
- </Or>
- </Match>
-
- <Match>
- <Or>
- <!-- Anonymous inner classes are very common in ODL. -->
- <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
-
- <!-- We use static slf4j Logger (this rule is from KengoTODA/findbugs-slf4j jp.skypencil.findbugs.slf4:bug-pattern) -->
- <Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC" />
-
- <!-- Guava 23.6+ uses @NullableDecl which FindBugs doesn't know about; fixed in SpotBugs 3.1.2+ -->
- <Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
- <Bug pattern="NP_NULL_PARAM_DEREF" />
- <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
- <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
- </Or>
- </Match>
-</FindBugsFilter>
diff --git a/sdnr/wt/odlux/apps/minimumApp/package.json b/sdnr/wt/odlux/apps/minimumApp/package.json
deleted file mode 100644
index f738c6354..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@odlux/minimum-app",
- "version": "0.1.0",
- "description": "A react based modular UI to demo the minimum possible app.",
- "main": "index.js",
- "scripts": {
- "start": "webpack-dev-server --env debug",
- "build": "webpack --env release --config webpack.config.js",
- "build:dev": "webpack --env debug --config webpack.config.js"
- },
- "repository": {
- "type": "git",
- "url": "https://git.mfico.de/highstreet-technologies/odlux.git"
- },
- "keywords": [
- "reactjs",
- "redux",
- "ui",
- "framework"
- ],
- "author": "Matthias Fischer",
- "license": "Apache-2.0",
- "dependencies": {
- "@odlux/framework": "*"
- },
- "peerDependencies": {
- "@types/react": "16.4.14",
- "@types/react-dom": "16.0.8",
- "@types/react-router-dom": "4.3.1",
- "@material-ui/core": "3.8.3",
- "@material-ui/icons": "3.0.2",
- "@types/classnames": "2.2.6",
- "@types/flux": "3.1.8",
- "@types/jquery": "3.3.10",
- "jquery": "3.3.1",
- "react": "16.5.2",
- "react-dom": "16.5.2",
- "react-router-dom": "4.3.1"
- }
-} \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/minimumApp/pom.xml b/sdnr/wt/odlux/apps/minimumApp/pom.xml
deleted file mode 100644
index 529daa544..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/pom.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>odlparent</artifactId>
- <version>1.5.1-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
- <artifactId>sdnr-wt-odlux-app-minimumApp</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <name>sdnr-wt-odlux-app-minimumApp</name>
- <licenses>
- <license>
- <name>Apache License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0</url>
- </license>
- </licenses>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sdnr-wt-odlux-core-model</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sdnr-wt-odlux-core-provider</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <pluginRepositories>
- <pluginRepository>
- <id>highstreet repo</id>
- <url>https://cloud-highstreet-technologies.com/mvn/</url>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- <build>
- <sourceDirectory>src2/main/java</sourceDirectory>
- <resources>
- <resource>
- <directory>dist</directory>
- <targetPath>odlux</targetPath>
- </resource>
- <resource>
- <directory>src2/main/resources</directory>
- </resource>
- <resource>
- <directory>src2/test/resources</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>dist</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>node</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>node_modules</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <fileset>
- <directory>../node_modules</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- <!-- eclipse bug build bin folder in basedir -->
- <fileset>
- <directory>bin</directory>
- <followSymlinks>false</followSymlinks>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src2/test/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>de.jacksitlab</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>1.7.1</version>
- <executions>
- <execution>
- <id>install node and yarn</id>
- <goals>
- <goal>install-node-and-yarn</goal>
- </goals>
- <!-- optional: default phase is "generate-resources" -->
- <phase>initialize</phase>
- <configuration>
- <nodeVersion>v8.10.0</nodeVersion>
- <yarnVersion>v1.12.3</yarnVersion>
- </configuration>
- </execution>
- <execution>
- <id>yarn build</id>
- <goals>
- <goal>yarn</goal>
- </goals>
- <configuration>
- <arguments>run build</arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Import-Package>org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.*</Import-Package>
- <Private-Package/>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/sdnr/wt/odlux/apps/minimumApp/src/handlers/minimumAppRootHandler.ts b/sdnr/wt/odlux/apps/minimumApp/src/handlers/minimumAppRootHandler.ts
deleted file mode 100644
index 463ad21e2..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src/handlers/minimumAppRootHandler.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed 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.
- * ============LICENSE_END==========================================================================
- */
-// main state handler
-
-import { combineActionHandler } from '../../../../framework/src/flux/middleware';
-
-import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
-
-export interface IMinimumAppStoreState {
-}
-
-declare module '../../../../framework/src/store/applicationStore' {
- interface IApplicationStoreState {
- minimum: IMinimumAppStoreState
- }
-}
-
-const actionHandlers = {
-};
-
-export const minimumAppRootHandler = combineActionHandler<IMinimumAppStoreState>(actionHandlers);
-export default minimumAppRootHandler;
diff --git a/sdnr/wt/odlux/apps/minimumApp/src/index.html b/sdnr/wt/odlux/apps/minimumApp/src/index.html
deleted file mode 100644
index 58865edc1..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <!-- <link rel="stylesheet" href="./vendor.css"> -->
- <title>Minimal App</title>
-</head>
-
-<body>
- <div id="app"></div>
- <script type="text/javascript" src="./require.js"></script>
- <script type="text/javascript" src="./config.js"></script>
- <script>
- // run the application
- require(["app", "minimumApp"], function (app) {
- app("./app.tsx")
- });
- </script>
-</body>
-
-</html> \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/minimumApp/src/plugin.tsx b/sdnr/wt/odlux/apps/minimumApp/src/plugin.tsx
deleted file mode 100644
index 3095ba783..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src/plugin.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt odlux
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed 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.
- * ============LICENSE_END==========================================================================
- */
-// app configuration and main entry point for the app
-
-import * as React from "react";
-import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom';
-
-import { faLock } from '@fortawesome/free-solid-svg-icons'; // select app icon
-
-import applicationManager from '../../../framework/src/services/applicationManager';
-import connect, { Connect } from '../../../framework/src/flux/connect';
-
-import { minimumAppRootHandler } from './handlers/minimumAppRootHandler';
-
-type AppProps = RouteComponentProps & Connect;
-
-const App = (props: AppProps) => (
- <div>Start your app here!!</div>
-);
-
-const FinalApp = withRouter(connect()(App));
-
-export function register() {
- applicationManager.registerApplication({
- name: "minimum",
- icon: faLock,
- rootComponent: FinalApp,
- rootActionHandler: minimumAppRootHandler,
- menuEntry: "Minimum"
- });
-}
-
-
diff --git a/sdnr/wt/odlux/apps/minimumApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java b/sdnr/wt/odlux/apps/minimumApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java
deleted file mode 100644
index 1e882fc69..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src2/main/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/MyOdluxBundle.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed 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.
- * ============LICENSE_END==========================================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.odlux.bundles;
-
-import org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundle;
-import org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundleLoader;
-
-public class MyOdluxBundle extends OdluxBundle {
-
- @Override
- public void initialize() {
- super.initialize();
- }
-
- @Override
- public void clean() {
- super.clean();
- }
-
- @Override
- public String getResourceFileContent(String filename) {
- return super.getResourceFileContent(filename);
- }
-
- @Override
- public boolean hasResource(String filename) {
- return super.hasResource(filename);
- }
-
- @Override
- public void setBundleName(String bundleName) {
- super.setBundleName(bundleName);
- }
-
- @Override
- public void setLoader(OdluxBundleLoader loader) {
- super.setLoader(loader);
- }
-
- @Override
- public String getBundleName() {
- return super.getBundleName();
- }
-
- @Override
- public OdluxBundleLoader getLoader() {
- return super.getLoader();
- }
-
- public MyOdluxBundle() {
- super();
- }
-}
diff --git a/sdnr/wt/odlux/apps/minimumApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wt/odlux/apps/minimumApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index 4c8ed1343..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src2/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <reference id="loadersvc" availability="mandatory" activation="eager" interface="org.onap.ccsdk.features.sdnr.wt.odlux.model.bundles.OdluxBundleLoader"/>
-
- <bean id="bundle" init-method="initialize" destroy-method="clean" class="org.onap.ccsdk.features.sdnr.wt.odlux.bundles.MyOdluxBundle">
- <property name="loader" ref="loadersvc"/>
- <property name="bundleName" value="minimumApp"/>
- <property name="index" value="999" />
- </bean>
-</blueprint> \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/minimumApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java b/sdnr/wt/odlux/apps/minimumApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java
deleted file mode 100644
index d0fbe63c0..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * Licensed 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.
- * ============LICENSE_END==========================================================================
- ******************************************************************************/
-package org.onap.ccsdk.features.sdnr.wt.odlux.bundles.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.odlux.OdluxBundleLoaderImpl;
-import org.onap.ccsdk.features.sdnr.wt.odlux.bundles.MyOdluxBundle;
-
-public class TestBundleRes {
-
- @Test
- public void test() {
- OdluxBundleLoaderImpl loader = OdluxBundleLoaderImpl.getInstance();
- MyOdluxBundle b = new MyOdluxBundle();
- b.setLoader(loader);
- b.setIndex(0);
- b.setBundleName("abc");
- b.initialize();
- assertTrue(loader.getNumberOfBundles()==1);
- assertNotNull(b.getLoader());
- assertEquals("abc",b.getBundleName());
- assertTrue(b.hasResource("test.js"));
- assertNotNull(b.getResourceFileContent("test.js"));
- b.clean();
- assertTrue(loader.getNumberOfBundles()==0);
- }
-
-}
diff --git a/sdnr/wt/odlux/apps/minimumApp/src2/test/resources/test.js b/sdnr/wt/odlux/apps/minimumApp/src2/test/resources/test.js
deleted file mode 100644
index b47fdc39f..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/src2/test/resources/test.js
+++ /dev/null
@@ -1,5 +0,0 @@
-asdac sad
-as
-d
-sad
- sadfa \ No newline at end of file
diff --git a/sdnr/wt/odlux/apps/minimumApp/tsconfig.json b/sdnr/wt/odlux/apps/minimumApp/tsconfig.json
deleted file mode 100644
index a66b5d828..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/tsconfig.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "compilerOptions": {
- "baseUrl": "./src",
- "outDir": "./dist",
- "sourceMap": true,
- "forceConsistentCasingInFileNames": true,
- "allowSyntheticDefaultImports": false,
- "allowUnreachableCode": false,
- "allowUnusedLabels": false,
- "noFallthroughCasesInSwitch": true,
- "noImplicitAny": true,
- "noImplicitReturns": true,
- "noImplicitThis": true,
- "strictNullChecks": true,
- "pretty": true,
- "newLine": "LF",
- "module": "es2015",
- "target": "es2016",
- "moduleResolution": "node",
- "experimentalDecorators": true,
- "jsx": "preserve",
- "lib": [
- "dom",
- "es2015",
- "es2016"
- ],
- "types": [
- "prop-types",
- "react",
- "react-dom"
- ]
- },
- "exclude": [
- "dist",
- "node_modules"
- ]
-}
diff --git a/sdnr/wt/odlux/apps/minimumApp/webpack.config.js b/sdnr/wt/odlux/apps/minimumApp/webpack.config.js
deleted file mode 100644
index 64a534464..000000000
--- a/sdnr/wt/odlux/apps/minimumApp/webpack.config.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Webpack 4 configuration file
- * see https://webpack.js.org/configuration/
- * see https://webpack.js.org/configuration/dev-server/
- */
-
-"use strict";
-
-const path = require("path");
-const webpack = require("webpack");
-const CopyWebpackPlugin = require("copy-webpack-plugin");
-const TerserPlugin = require('terser-webpack-plugin');
-
-// const __dirname = (path => path.replace(/^([a-z]\:)/, c => c.toUpperCase()))(process.__dirname());
-
-module.exports = (env) => {
- const distPath = path.resolve(__dirname, env === "release" ? "." : "../..", "dist");
- const frameworkPath = path.resolve(__dirname, env === "release" ? "../../framework" : "../..", "dist");
- return [{
- name: "App",
-
- mode: "none", //disable default behavior
-
- target: "web",
-
- context: path.resolve(__dirname, "src"),
-
- entry: {
- minimumApp: ["./plugin.tsx"]
- },
-
- devtool: env === "release" ? false : "source-map",
-
- resolve: {
- extensions: [".ts", ".tsx", ".js", ".jsx"]
- },
-
- output: {
- path: distPath,
- filename: "[name].js",
- library: "[name]",
- libraryTarget: "umd2",
- chunkFilename: "[name].js"
- },
- module: {
- rules: [{
- test: /\.tsx?$/,
- exclude: /node_modules/,
- use: [{
- loader: "babel-loader"
- }, {
- loader: "ts-loader"
- }]
- }, {
- test: /\.jsx?$/,
- exclude: /node_modules/,
- use: [{
- loader: "babel-loader"
- }]
- }]
- },
-
- optimization: {
- noEmitOnErrors: true,
- namedModules: env !== "release",
- minimize: env === "release",
- minimizer: env !== "release" ? [] : [new TerserPlugin({
- terserOptions: {
- warnings: false, // false, true, "verbose"
- compress: {
- drop_console: true,
- drop_debugger: true,
- }
- }
- })],
- },
-
- plugins: [
- new webpack.DllReferencePlugin({
- context: path.resolve(__dirname, "../../framework/src"),
- manifest: require(path.resolve(frameworkPath, "vendor-manifest.json")),
- sourceType: "umd2"
- }),
- new webpack.DllReferencePlugin({
- context: path.resolve(__dirname, "../../framework/src"),
- manifest: require(path.resolve(frameworkPath, "app-manifest.json")),
- sourceType: "umd2"
- }),
- ...(env === "release") ? [
- new webpack.DefinePlugin({
- "process.env": {
- NODE_ENV: "'production'",
- VERSION: JSON.stringify(require("./package.json").version)
- }
- }),
- ] : [
- new webpack.DefinePlugin({
- "process.env": {
- NODE_ENV: "'development'",
- VERSION: JSON.stringify(require("./package.json").version)
- }
- }),
- new CopyWebpackPlugin([{
- from: 'index.html',
- to: distPath
- }]),
- ]
- ],
-
- devServer: {
- public: "http://localhost:3100",
- contentBase: frameworkPath,
-
- compress: true,
- headers: {
- "Access-Control-Allow-Origin": "*"
- },
- host: "0.0.0.0",
- port: 3100,
- disableHostCheck: true,
- historyApiFallback: true,
- inline: true,
- hot: false,
- quiet: false,
- stats: {
- colors: true
- },
- proxy: {
- "/api": {
- target: "http://localhost:3001",
- secure: false
- }
- }
- }
- }];
-}