use ui-scripts to build the core plugins

This commit is contained in:
Sebastian Sdorra
2019-10-15 13:07:22 +02:00
parent 61e2d065fd
commit 09eebd7985
14 changed files with 114 additions and 290 deletions

View File

@@ -1,11 +1,13 @@
[declarations]
../../scm-ui/ui-types/.*
../../scm-ui/ui-components/.*
../../scm-ui/ui-extensions/.*
[include]
./src/**
../../scm-ui/ui-types/.*
../../scm-ui/ui-components/.*
../../scm-ui/ui-extensions/.*
[options]
module.system.node.resolve_dirname=../../node_modules

View File

@@ -1,16 +1,39 @@
{
"name": "@scm-manager/scm-svn-plugin",
"main": "src/main/js/index.js",
"private": true,
"version": "2.0.0-SNAPSHOT",
"license": "BSD-3-Clause",
"main": "src/main/js/index.js",
"scripts": {
"build": "webpack --mode=production"
"build": "ui-scripts plugin",
"watch": "ui-scripts plugin-watch"
},
"babel": {
"presets": ["@scm-manager/babel-preset"]
"presets": [
"@scm-manager/babel-preset"
]
},
"jest": {
"preset": "@scm-manager/jest-preset"
},
"prettier": "@scm-manager/prettier-config"
"prettier": "@scm-manager/prettier-config",
"dependencies": {
"@scm-manager/ui-components": "2.0.0-SNAPSHOT",
"@scm-manager/ui-extensions": "2.0.0-SNAPSHOT",
"@scm-manager/ui-types": "2.0.0-SNAPSHOT",
"react": "^16.10.2",
"react-i18next": "^10.13.1",
"styled-components": "^4.4.0"
},
"devDependencies": {
"@scm-manager/babel-preset": "2.0.0-SNAPSHOT",
"@scm-manager/eslint-config": "2.0.0-SNAPSHOT",
"@scm-manager/jest-preset": "2.0.0-SNAPSHOT",
"@scm-manager/prettier-config": "2.0.0-SNAPSHOT",
"@scm-manager/ui-scripts": "2.0.0-SNAPSHOT",
"@scm-manager/ui-tests": "2.0.0-SNAPSHOT",
"flow-bin": "^0.109.0",
"flow-typed": "^2.6.1",
"jest": "^24.9.0"
}
}

View File

@@ -1,65 +0,0 @@
const path = require("path");
module.exports = {
entry: {
"scm-svn-plugin": "./src/main/js/index.js"
},
devtool: "source-map",
target: "web",
node: {
fs: "empty",
net: "empty",
tls: "empty"
},
externals: [
"react",
"react-dom",
"react-i18next",
"react-router-dom",
"styled-components",
"@scm-manager/ui-types",
"@scm-manager/ui-extensions",
"@scm-manager/ui-components"
],
module: {
rules: [
{
parser: {
system: false,
systemjs: false
}
},
{
test: /\.(js|jsx)$/,
// exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@scm-manager/babel-preset"]
}
}
},
{
test: /\.(css|scss|sass)$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader"
]
},
{
test: /\.(png|svg|jpg|gif|woff2?|eot|ttf)$/,
use: ["file-loader"]
}
]
},
output: {
path: path.join(__dirname, "target", "scm-svn-plugin-2.0.0-SNAPSHOT", "webapp", "assets"),
filename: "[name].bundle.js",
library: "scm-svn-plugin",
libraryTarget: "amd"
}
};