Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript build and obs fixes #277

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"license-checker-webpack-plugin": "^0.0.4",
"shelljs": "^0.8.2",
"tap-stream": "^0.2.0",
"terser-webpack-plugin": "^1.1.0",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.10"
"webpack-cli": "^3.1.0"
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions susemanager-frontend/susemanager-nodejs-sdk-devel/setup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
(cd susemanager-frontend/susemanager-nodejs-sdk-devel; rm -rf node_modules)
yarn install --frozen-lockfile
echo "susemanager-nodejs-modules.tar.gz"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- upgrade react
- Add lodash
- Add react-hot-loader and webpack-dev-server

Expand Down
898 changes: 494 additions & 404 deletions susemanager-frontend/yarn.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions web/html/src/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const {pages} = require("../manager/index");
const webpack = require("webpack");
const CopyWebpackPlugin = require('copy-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = (env, argv) => {

Expand All @@ -12,6 +13,7 @@ module.exports = (env, argv) => {
if(isProductionMode) {
// If we are on production mode we want to make sure we don't mix vendors code with source code
optimization = {
minimizer: [new TerserPlugin({extractComments: true})],
splitChunks: {
cacheGroups: {
vendor: {
Expand Down
6 changes: 6 additions & 0 deletions web/html/src/build/webpack.config.vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const webpack = require("webpack");
const vendors = require("../vendors/vendors");
const LicenseCheckerWebpackPlugin = require("license-checker-webpack-plugin");
const CleanWebpackPlugin = require('clean-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');


module.exports = (env, argv) => {

Expand Down Expand Up @@ -32,13 +34,17 @@ module.exports = (env, argv) => {
return {
name: "vendors",
entry: {vendors},

output: {
path: path.resolve(__dirname, "../dist"),
filename: "vendors/vendors.bundle.js",
sourceMapFilename: "[name].map",
pathinfo: true,
library: '[name]_dll'
},
optimization: {
minimizer: [new TerserPlugin({extractComments: true})],
},
plugins: pluginsInUse,
}
};
3 changes: 2 additions & 1 deletion web/html/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"postinstall": "yarn build"
},
"devDependencies": {
"flow-bin": "^0.82.0"
"flow-bin": "^0.82.0",
"webpack-dev-server": "^3.1.10"
},
"engines": {
"node": ">=8.0.0",
Expand Down
17 changes: 9 additions & 8 deletions web/html/src/vendors/npm.licenses.structured.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
// This file is auto-generated by the webpack plugin: license-checker-webpack-plugin
const npmLicensesArray = [
"MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "BSD-3-Clause", "MIT", "MIT", "MIT", "MIT",
"MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "MIT", "BSD-3-Clause", "MIT", "MIT", "MIT", "MIT",
];

const npmDependencies = [
{ name: "@babel/polyfill", license: "MIT", version: "7.0.0" },
{ name: "@babel/runtime", license: "MIT", version: "7.1.5" },
{ name: "@emotion/hash", license: "MIT", version: "0.6.6" },
{ name: "@emotion/memoize", license: "MIT", version: "0.6.6" },
{ name: "@emotion/stylis", license: "MIT", version: "0.7.1" },
{ name: "@emotion/unitless", license: "MIT", version: "0.6.7" },
{ name: "core-js", license: "MIT", version: "2.5.7" },
{ name: "create-emotion", license: "MIT", version: "9.2.12" },
{ name: "create-react-class", license: "MIT", version: "15.6.3" },
{ name: "dom-helpers", license: "MIT", version: "3.3.1" },
{ name: "dom-helpers", license: "MIT", version: "3.4.0" },
{ name: "emotion", license: "MIT", version: "9.2.12" },
{ name: "fbjs", license: "MIT", version: "0.8.17" },
{ name: "lodash", license: "MIT", version: "4.17.11" },
{ name: "memoize-one", license: "MIT", version: "4.0.2" },
{ name: "memoize-one", license: "MIT", version: "4.0.3" },
{ name: "object-assign", license: "MIT", version: "4.1.1" },
{ name: "performance-now", license: "MIT", version: "2.1.0" },
{ name: "process", license: "MIT", version: "0.11.10" },
{ name: "prop-types", license: "MIT", version: "15.6.2" },
{ name: "raf", license: "MIT", version: "3.4.0" },
{ name: "react", license: "MIT", version: "16.6.0" },
{ name: "react-dom", license: "MIT", version: "16.6.0" },
{ name: "raf", license: "MIT", version: "3.4.1" },
{ name: "react", license: "MIT", version: "16.6.1" },
{ name: "react-dom", license: "MIT", version: "16.6.1" },
{ name: "react-hot-loader", license: "MIT", version: "4.3.12" },
{ name: "react-input-autosize", license: "MIT", version: "2.2.1" },
{ name: "react-lifecycles-compat", license: "MIT", version: "3.0.4" },
{ name: "react-select", license: "MIT", version: "2.1.1" },
{ name: "react-transition-group", license: "BSD-3-Clause", version: "2.5.0" },
{ name: "regenerator-runtime", license: "MIT", version: "0.11.1" },
{ name: "scheduler", license: "MIT", version: "0.10.0" },
{ name: "scheduler", license: "MIT", version: "0.11.0" },
{ name: "stylis-rule-sheet", license: "MIT", version: "0.0.10" },
{ name: "webpack", license: "MIT", version: "4.20.2" },
{ name: "webpack", license: "MIT", version: "4.25.1" },

];

Expand Down
85 changes: 76 additions & 9 deletions web/html/src/vendors/npm.licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,35 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
@babel/runtime v7.1.5 - Sebastian McKenzie <sebmck@gmail.com>
https://github.com/babel/babel/tree/master/packages/babel-runtime
--------------------------------------------------------------------------------

MIT License

Copyright (c) 2014-2018 Sebastian McKenzie and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
@emotion/hash v0.6.6
https://github.com/emotion-js/emotion/tree/master/next-packages/hash
Expand Down Expand Up @@ -226,11 +255,31 @@ SOFTWARE.


--------------------------------------------------------------------------------
dom-helpers v3.3.1 - Jason Quense
dom-helpers v3.4.0 - Jason Quense
jquense/dom-helpers
--------------------------------------------------------------------------------

MIT
The MIT License (MIT)

Copyright (c) 2015 Jason Quense

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------
emotion v9.2.12 - Kye Hohenberger
Expand Down Expand Up @@ -342,7 +391,7 @@ terms above.


--------------------------------------------------------------------------------
memoize-one v4.0.2 - Alex Reardon <alexreardon@gmail.com>
memoize-one v4.0.3 - Alex Reardon <alexreardon@gmail.com>
https://github.com/alexreardon/memoize-one.git
--------------------------------------------------------------------------------

Expand Down Expand Up @@ -478,14 +527,32 @@ SOFTWARE.


--------------------------------------------------------------------------------
raf v3.4.0 - Chris Dickinson <chris@neversaw.us>
raf v3.4.1 - Chris Dickinson <chris@neversaw.us>
git://github.com/chrisdickinson/raf.git
--------------------------------------------------------------------------------

MIT
Copyright 2013 Chris Dickinson <chris@neversaw.us>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
react v16.6.0
react v16.6.1
facebook/react
--------------------------------------------------------------------------------

Expand Down Expand Up @@ -513,7 +580,7 @@ SOFTWARE.


--------------------------------------------------------------------------------
react-dom v16.6.0
react-dom v16.6.1
facebook/react
--------------------------------------------------------------------------------

Expand Down Expand Up @@ -697,7 +764,7 @@ https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime
MIT

--------------------------------------------------------------------------------
scheduler v0.10.0
scheduler v0.11.0
facebook/react
--------------------------------------------------------------------------------

Expand Down Expand Up @@ -732,7 +799,7 @@ https://github.com/thysultan/stylis.js
MIT

--------------------------------------------------------------------------------
webpack v4.20.2 - Tobias Koppers @sokra
webpack v4.25.1 - Tobias Koppers @sokra
https://github.com/webpack/webpack.git
--------------------------------------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion web/html/src/vendors/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const vendors = [
"regenerator-runtime/runtime",
"react-hot-loader",
"lodash",
"create-react-class"
"create-react-class",
"webpack/buildin/harmony-module"
];

module.exports = vendors;
1 change: 1 addition & 0 deletions web/spacewalk-web.spec
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ cp -r html/src/dist/javascript/manager %{buildroot}/srv/www/htdocs/javascript

%{__mkdir_p} %{buildroot}/srv/www/htdocs/vendors
cp html/src/dist/vendors/vendors.bundle.js %{buildroot}/srv/www/htdocs/vendors/vendors.bundle.js
cp html/src/dist/vendors/vendors.bundle.js.LICENSE %{buildroot}/srv/www/htdocs/vendors/vendors.bundle.js.LICENSE

%files -n susemanager-web-libs
%defattr(644,root,root,755)
Expand Down