Przeglądaj źródła

Update dependencies

Update scripts and index.html accordingly with changes in
html-webpack-plugin
and
clean-webpack-plugin
jmacura 5 lat temu
rodzic
commit
b4ad367475
5 zmienionych plików z 990 dodań i 174 usunięć
  1. 960 146
      package-lock.json
  2. 23 21
      package.json
  3. 3 3
      src/index.html
  4. 1 3
      webpack.common.js
  5. 3 1
      webpack.dev.js

Plik diff jest za duży
+ 960 - 146
package-lock.json


+ 23 - 21
package.json

@@ -5,10 +5,10 @@
   "main": "build/index.html",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
-    "build": "node node_modules/hslayers-ng/scripts/bootstrap-isolate.js && npx webpack --config ./webpack.prod.js --progress",
-    "build-dev": "node node_modules/hslayers-ng/scripts/bootstrap-isolate.js && npx webpack --config ./webpack.dev.js --progress",
-    "start": "npx http-server ./static -p 8080",
-    "start-dev": "npx webpack-dev-server --config ./webpack.dev.js --watch"
+    "build": "node node_modules/hslayers-ng/scripts/bootstrap-isolate.js && webpack --config ./webpack.prod.js --progress",
+    "build-dev": "node node_modules/hslayers-ng/scripts/bootstrap-isolate.js && webpack --config ./webpack.dev.js --progress",
+    "start": "http-server ./build -p 8080",
+    "start-dev": "webpack-dev-server --config ./webpack.dev.js --watch"
   },
   "repository": {
     "type": "git",
@@ -19,41 +19,43 @@
     "attractiveness"
   ],
   "author": "Jan Macura",
-  "contributors": ["Raitis Bērziņš"],
+  "contributors": [
+    "Raitis Bērziņš"
+  ],
   "license": "MIT",
   "dependencies": {
     "csvtojson": "^2.0.10",
-    "hslayers-ng": "^1.16.0",
-    "http-server": "^0.12.1"
+    "hslayers-ng": "^1.20.2",
+    "http-server": "^0.12.3"
   },
   "devDependencies": {
-    "@babel/core": "^7.9.0",
+    "@babel/core": "^7.9.6",
     "@babel/plugin-syntax-dynamic-import": "^7.8.3",
     "babel-loader": "^8.1.0",
     "babel-plugin-angularjs-annotate": "^0.10.0",
-    "clean-webpack-plugin": "^2.0.2",
-    "css-loader": "^2.1.1",
-    "eslint": "^6.8.0",
+    "clean-webpack-plugin": "^3.0.0",
+    "css-loader": "^3.5.3",
+    "eslint": "^7.0.0",
     "eslint-config-standard": "^14.1.1",
     "eslint-plugin-import": "^2.20.2",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^4.2.1",
     "eslint-plugin-standard": "^4.0.1",
-    "extract-loader": "^3.1.0",
-    "file-loader": "^3.0.1",
-    "html-loader": "^0.5.5",
-    "html-webpack-plugin": "^3.2.0",
-    "mini-css-extract-plugin": "^0.6.0",
+    "extract-loader": "^5.0.1",
+    "file-loader": "^6.0.0",
+    "html-loader": "^1.1.0",
+    "html-webpack-plugin": "^4.3.0",
+    "mini-css-extract-plugin": "^0.9.0",
     "ng-cache-loader": "0.0.26",
     "npm-run-all": "^4.1.5",
     "optimize-css-assets-webpack-plugin": "^5.0.3",
-    "postcss": "^7.0.27",
+    "postcss": "^7.0.30",
     "postcss-prefix-selector": "^1.7.1",
-    "style-loader": "^0.23.1",
-    "url-loader": "^2.1.0",
-    "webpack": "^4.42.1",
+    "style-loader": "^1.2.1",
+    "url-loader": "^4.1.0",
+    "webpack": "^4.43.0",
     "webpack-cli": "^3.3.11",
-    "webpack-dev-server": "^3.10.3",
+    "webpack-dev-server": "^3.11.0",
     "webpack-merge": "^4.2.2"
   }
 }

+ 3 - 3
src/index.html

@@ -9,12 +9,12 @@
   <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
   <% for (var css in htmlWebpackPlugin.files.css) { %>
     <link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
-    <% } %>
+  <% } %>
 </head>
 <body >
     <div hs ng-app="hs" ng-controller="Main" style="height: 100vh;"></div>
-    <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
-      <script type="application/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
+    <% for (var js in htmlWebpackPlugin.files.js) { %>
+      <script type="application/javascript" src="<%= htmlWebpackPlugin.files.js[js] %>"></script>
     <% } %>
 </body>
 </html>

+ 1 - 3
webpack.common.js

@@ -10,15 +10,13 @@
  *   `'ngInject';` or `@ngInject` in comments. See https://docs.angularjs.org/guide/di
  */
 const path = require('path');
-const CleanWebpackPlugin = require('clean-webpack-plugin');
+const { CleanWebpackPlugin } = require('clean-webpack-plugin');
 const HtmlWebpackPlugin = require('html-webpack-plugin');
 const hslPaths = require(path.join(__dirname, './node_modules/hslayers-ng/common_paths'));
 
 module.exports = {
   entry: { main: './src/app.js' },
   output: {
-    // Path where bundled files will be output
-    path: path.resolve(__dirname, './static'),
     // Path at which output assets will be served
     publicPath: ''
   },

+ 3 - 1
webpack.dev.js

@@ -31,11 +31,13 @@ module.exports = merge(common, {
   },
   output: {
     // see https://webpack.js.org/guides/build-performance#output-without-path-info
+    // Path where bundled files will be output
+    path: path.resolve(__dirname, './static'),
     pathinfo: false,
     filename: '[name].bundle.js'
   },
   devServer: {
-    contentBase: './static',
+    contentBase: path.resolve(__dirname, './static'),
     hot: false,
     host: '0.0.0.0',
     port: env.HTTP_PORT || 8082

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików