diff --git a/scm-ui/.babelrc b/scm-ui/.babelrc
new file mode 100644
index 0000000000..a248d20409
--- /dev/null
+++ b/scm-ui/.babelrc
@@ -0,0 +1,6 @@
+{
+ "presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-flow"],
+ "plugins": [
+ "@babel/plugin-proposal-class-properties"
+ ]
+}
diff --git a/scm-ui/.eslintrc b/scm-ui/.eslintrc
index d299c1fed5..8411c357f5 100644
--- a/scm-ui/.eslintrc
+++ b/scm-ui/.eslintrc
@@ -1,3 +1,29 @@
{
- "extends": "react-app"
+ "parser": "babel-eslint",
+ "extends": [
+ "eslint:recommended",
+ "plugin:react/recommended",
+ "plugin:flowtype/recommended"
+ ],
+ "plugins": [
+ "flowtype",
+ "react",
+ "jsx-a11y",
+ "import"
+ ],
+ "rules": {
+ "quotes": ["error", "double"]
+ },
+ "env": {
+ "browser": true
+ },
+ "overrides": [
+ {
+ "files": [ "*.test.js" ],
+ "env": {
+ "jest": true,
+ "browser": true
+ }
+ }
+ ]
}
diff --git a/scm-ui/package.json b/scm-ui/package.json
index 6ce2e8880e..20fcb4b523 100644
--- a/scm-ui/package.json
+++ b/scm-ui/package.json
@@ -3,7 +3,9 @@
"name": "scm-ui",
"version": "0.1.0",
"private": true,
+ "main": "src/index.js",
"dependencies": {
+ "@scm-manager/ui-extensions": "^0.0.3",
"bulma": "^0.7.1",
"classnames": "^2.2.5",
"font-awesome": "^4.7.0",
@@ -12,14 +14,13 @@
"i18next-browser-languagedetector": "^2.2.2",
"i18next-fetch-backend": "^0.1.0",
"moment": "^2.22.2",
- "react": "^16.4.1",
- "react-dom": "^16.4.1",
+ "react": "^16.4.2",
+ "react-dom": "^16.4.2",
"react-i18next": "^7.9.0",
"react-jss": "^8.6.0",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9",
- "react-scripts": "1.1.4",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.5",
"redux-logger": "^3.0.6",
@@ -28,51 +29,34 @@
"scripts": {
"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
- "start-js": "react-scripts start",
- "start": "npm-run-all -p watch-css start-js",
- "build-js": "react-scripts build",
- "build": "npm-run-all build-css build-js",
- "test": "jest",
- "test-coverage": "jest --coverage",
- "test-ci": "jest --ci --coverage",
- "eject": "react-scripts eject",
+ "start-js": "ui-bundler serve",
+ "start": "npm-run-all -p watch-css build-vendor start-js",
+ "build-js": "ui-bundler bundle target/scm-ui.bundle.js",
+ "build-vendor": "ui-bundler vendor target/vendor.bundle.js",
+ "build": "npm-run-all build-css build-vendor build-js",
+ "test": "ui-bundler test",
+ "test-ci": "ui-bundler test --ci",
"flow": "flow",
"pre-commit": "jest && flow && eslint src"
},
- "proxy": {
- "/scm/api": {
- "target": "http://localhost:8081"
- }
- },
"devDependencies": {
+ "@scm-manager/ui-bundler": "^0.0.3",
+ "babel-eslint": "^8.2.6",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
+ "eslint": "^5.3.0",
+ "eslint-plugin-flowtype": "^2.50.0",
+ "eslint-plugin-import": "^2.14.0",
+ "eslint-plugin-jsx-a11y": "^6.1.1",
+ "eslint-plugin-react": "^7.10.0",
"fetch-mock": "^6.5.0",
"flow-bin": "^0.77.0",
"flow-typed": "^2.5.1",
- "jest-junit": "^5.1.0",
+ "jest": "^23.5.0",
"node-sass-chokidar": "^1.3.0",
"npm-run-all": "^4.1.3",
"prettier": "^1.13.7",
"react-test-renderer": "^16.4.1",
"redux-mock-store": "^1.5.3"
- },
- "babel": {
- "presets": [
- "react-app"
- ]
- },
- "jest": {
- "coverageDirectory": "target/jest-reports/coverage",
- "coveragePathIgnorePatterns": [
- "src/tests/.*"
- ],
- "reporters": [
- "default",
- "jest-junit"
- ]
- },
- "jest-junit": {
- "output": "./target/jest-reports/TEST-all.xml"
}
}
diff --git a/scm-ui/src/images/blib.jpg b/scm-ui/public/images/blib.jpg
similarity index 100%
rename from scm-ui/src/images/blib.jpg
rename to scm-ui/public/images/blib.jpg
diff --git a/scm-ui/src/images/loading.svg b/scm-ui/public/images/loading.svg
similarity index 100%
rename from scm-ui/src/images/loading.svg
rename to scm-ui/public/images/loading.svg
diff --git a/scm-ui/src/images/logo.png b/scm-ui/public/images/logo.png
similarity index 100%
rename from scm-ui/src/images/logo.png
rename to scm-ui/public/images/logo.png
diff --git a/scm-ui/public/index.html b/scm-ui/public/index.html
index 1891f54ac7..e737e4ffe9 100644
--- a/scm-ui/public/index.html
+++ b/scm-ui/public/index.html
@@ -8,8 +8,8 @@
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
-
-
+
+
+